From 8249b28bea29e8ce17eac12776a60ec3f9e47176 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 17 Oct 2024 19:42:29 -0500 Subject: Rename InvalidInput to ArgumentInvalid. --- include/fud_string.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/fud_string.hpp') diff --git a/include/fud_string.hpp b/include/fud_string.hpp index 4367aae..ba05450 100644 --- a/include/fud_string.hpp +++ b/include/fud_string.hpp @@ -72,7 +72,7 @@ class String { auto lengthResult = cStringLength(cString); if (lengthResult < 0 || lengthResult >= SSIZE_MAX) { - return StringResult::error(FudStatus::InvalidInput); + return StringResult::error(FudStatus::ArgumentInvalid); } auto stringLength = static_cast(lengthResult); if (SIZE_MAX - totalLength < stringLength) { @@ -89,6 +89,7 @@ class String { output.m_allocator = allocator; if (output.m_length >= output.m_capacity) { output.m_capacity = output.m_length + 1; + /* Avoid using compiler expansions in headers */ auto dataResult = output.m_allocator->allocate(output.m_capacity); if (dataResult.isError()) { return StringResult::error(dataResult.getError()); -- cgit v1.2.3