summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/fud_string_view.cpp2
-rw-r--r--source/libfud.cpp8
2 files changed, 4 insertions, 6 deletions
diff --git a/source/fud_string_view.cpp b/source/fud_string_view.cpp
index fdb63b3..1cc73a6 100644
--- a/source/fud_string_view.cpp
+++ b/source/fud_string_view.cpp
@@ -1066,7 +1066,7 @@ FudStatus stringViewToFloat(StringView input, T& number, size_t& index)
if (std::isinf(num) || std::isnan(num)) // isnan is dubious here - likely unreachable
{
- return ExtRangeError;
+ return FudStatus::RangeError;
}
return retSuccess();
diff --git a/source/libfud.cpp b/source/libfud.cpp
index 802b2c7..be43490 100644
--- a/source/libfud.cpp
+++ b/source/libfud.cpp
@@ -17,8 +17,7 @@
#include "libfud.hpp"
-#include "fud_assert.hpp"
-#include "fud_version.hpp"
+#include "fud_config.hpp"
#include <cstdlib>
@@ -27,12 +26,11 @@ namespace fud {
FUD fud()
{
FUD fudInfo{};
- static_assert(sizeof(GitHash) >= sizeof(fudInfo.revision));
+ static_assert(sizeof(FudGitHash) >= sizeof(fudInfo.revision));
fudInfo.major = FudVersionMajor;
fudInfo.minor = FudVersionMinor;
fudInfo.patch = FudVersionPatch;
- auto copyResult = copyMem(fudInfo.revision.data(), fudInfo.revision.size(), GitHash, fudInfo.revision.size() - 1);
- fudAssert(copyResult == FudStatus::Success);
+ copyMem<sizeof(fudInfo.revision) - 1>(fudInfo.revision, FudGitHash);
fudInfo.revision[fudInfo.revision.size() - 1] = '\0';
return fudInfo;
}