diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-21 12:49:43 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-21 12:49:43 -0500 |
commit | b2dbcb55e2832c373fecb4033a3ed77e5dbc77aa (patch) | |
tree | 1f294fcf1d85a02db86de3eea2b03393fd89ca5a /source | |
parent | 6a27a2a4032e88fa9154ef0f0741edc584f7a701 (diff) |
Add vector and option.
Diffstat (limited to 'source')
-rw-r--r-- | source/fud_string_view.cpp | 2 | ||||
-rw-r--r-- | source/libfud.cpp | 8 |
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; } |