Skip to content

Commit

Permalink
Avoid selecting code for luajit only.
Browse files Browse the repository at this point in the history
  • Loading branch information
kunitoki committed Dec 22, 2022
1 parent bfd4c48 commit a98be6b
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions Source/LuaBridge/detail/ClassInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ namespace detail {

[[nodiscard]] constexpr auto fnv1a(const char* s, std::size_t count) noexcept
{
#if LUABRIDGE_ON_LUAJIT
uint32_t seed = 2166136261u;

for (std::size_t i = 0; i < count; ++i)
Expand All @@ -37,28 +36,6 @@ namespace detail {
return static_cast<uint64_t>(seed);
else
return seed;

#else
if constexpr (sizeof(void*) == 4)
{
uint32_t seed = 2166136261u;

for (std::size_t i = 0; i < count; ++i)
seed ^= static_cast<uint32_t>(*s++) * 16777619u;

return seed;
}
else
{
uint64_t seed = 14695981039346656037ull;

for (std::size_t i = 0; i < count; ++i)
seed ^= static_cast<uint64_t>(*s++) * 1099511628211ull;

return seed;
}

#endif
}

template <class T>
Expand Down

0 comments on commit a98be6b

Please sign in to comment.