fix uint32_t
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
#include "iterators/sequence_ostream_iterator.hpp"
|
#include "iterators/sequence_ostream_iterator.hpp"
|
||||||
#include "iterators/associative_ostream_iterator.hpp"
|
#include "iterators/associative_ostream_iterator.hpp"
|
||||||
#include "math/matrix.hpp"
|
#include "math/matrix.hpp"
|
||||||
|
// #include "nlohmann/json.hpp"
|
||||||
|
|
||||||
namespace hack
|
namespace hack
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace hack::utils
|
|||||||
// switch(case_int("key"))
|
// switch(case_int("key"))
|
||||||
// case case_int("test"): hack::log()("wow!");
|
// case case_int("test"): hack::log()("wow!");
|
||||||
// case case_int("no_test"): hack::log()("wow!");
|
// case case_int("no_test"): hack::log()("wow!");
|
||||||
inline constexpr std::uint32_t case_int(const char* str, std::uint32_t hash = 2166136261UL)
|
inline constexpr uint32_t case_int(const char* str, uint32_t hash = 2166136261UL)
|
||||||
{
|
{
|
||||||
return *str ? case_int(str + 1, (hash ^ *str) * 16777619ULL) : hash;
|
return *str ? case_int(str + 1, (hash ^ *str) * 16777619ULL) : hash;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user