From 0b400af9519444deef4cc6ad2c43c30e2092ab4f Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sat, 4 Jan 2025 09:56:12 -0600 Subject: Fix bug related to string copying. --- include/libfud.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/libfud.hpp') diff --git a/include/libfud.hpp b/include/libfud.hpp index f0a2517..542c836 100644 --- a/include/libfud.hpp +++ b/include/libfud.hpp @@ -18,8 +18,9 @@ #ifndef LIBFUD_HPP #define LIBFUD_HPP -#include "fud_array.hpp" #include "fud_allocator.hpp" +#include "fud_array.hpp" +#include "fud_option.hpp" #include "fud_result.hpp" #include "fud_status.hpp" #include "fud_string.hpp" @@ -55,7 +56,7 @@ FUD fud(); * \returns FudStatus::NullPointer if name is a null pointer. * \returns FudStatus::NotFound if no binding for the variable exists. */ -Result getEnv(const char* name, Allocator* allocator= &globalFudAllocator); +Result, FudStatus> getEnv(const char* name, Allocator* allocator = &globalFudAllocator); /** \brief A concept requiring the object T to have a method c_str returning a * pointer to a C string. */ @@ -75,7 +76,7 @@ concept CStringRepr = requires(T strObj) { * \returns @getEnv return values. */ template -Result getEnv(const T& name, Allocator* allocator = &globalFudAllocator) +Result, FudStatus> getEnv(const T& name, Allocator* allocator = &globalFudAllocator) { return getEnv(name.c_str(), allocator); } -- cgit v1.2.3