[*] boring clean up and refactor

This commit is contained in:
Reece Wilson 2021-10-09 00:39:42 +01:00
parent f559897b42
commit fc16065d5e
4 changed files with 15 additions and 15 deletions

View File

@ -11,12 +11,12 @@ namespace Aurora::Hashing
{
namespace CE
{
constexpr uint64_t kFnv1MagicVal64 = 0xcbf29ce484222325;
constexpr uint64_t kFnv1MagicPrime64 = 0x100000001b3;
constexpr AuUInt64 kFnv1MagicVal64 = 0xcbf29ce484222325;
constexpr AuUInt64 kFnv1MagicPrime64 = 0x100000001b3;
inline constexpr uint64_t fnv1a(const char *const str, const uint64_t value = kFnv1MagicVal64) noexcept
inline constexpr AuUInt64 fnv1a(const char *const str, const AuUInt64 value = kFnv1MagicVal64) noexcept
{
return (str[0] == '\0') ? value : fnv1a(&str[1], (value ^ uint64_t(str[0])) * kFnv1MagicPrime64);
return (str[0] == '\0') ? value : fnv1a(&str[1], (value ^ AuUInt64(str[0])) * kFnv1MagicPrime64);
}
inline constexpr uint32_t fnv1a_trunc(const char *const str) noexcept
@ -24,12 +24,12 @@ namespace Aurora::Hashing
return static_cast<uint32_t>(fnv1a(str));
}
constexpr uint64_t kFnv1MagicVal32 = 0x811c9dc5;
constexpr uint64_t kFnv1MagicPrime32 = 0x01000193;
constexpr AuUInt32 kFnv1MagicVal32 = 0x811c9dc5;
constexpr AuUInt32 kFnv1MagicPrime32 = 0x01000193;
inline constexpr uint32_t fnv1a_32(const char *const str, const uint32_t value = kFnv1MagicVal32) noexcept
inline constexpr uint32_t fnv1a_32(const char *const str, const AuUInt32 value = kFnv1MagicVal32) noexcept
{
return (str[0] == '\0') ? value : fnv1a_32(&str[1], (value ^ uint32_t(str[0])) * kFnv1MagicPrime32);
return (str[0] == '\0') ? value : fnv1a_32(&str[1], (value ^ AuUInt32(str[0])) * kFnv1MagicPrime32);
}
}
}

View File

@ -353,7 +353,7 @@ namespace Aurora::Console::ConsoleStd
if (line.size())
{
Console::Commands::DispatchCommand(line);
Console::Commands::DispatchRawLine(line);
}
}

View File

@ -530,8 +530,8 @@ namespace Aurora::Parse
}
}
result.SyntaxError = "No-Debug";
result.DebugTree = "No-Debug";
result.syntaxError = "No-Debug";
result.debugTree = "No-Debug";
return true;
}