Applied readability-magic-numbers clang-tidy fixes

This commit is contained in:
Bartek Kryza
2022-12-20 23:49:20 +01:00
parent 0687c3093e
commit 134ad77f5c
8 changed files with 38 additions and 13 deletions

View File

@@ -281,4 +281,13 @@ template <> bool ends_with(const std::string &value, const std::string &suffix)
return std::equal(suffix.rbegin(), suffix.rend(), value.rbegin());
}
std::size_t hash_seed(std::size_t seed)
{
constexpr auto kSeedStart{0x6a3712b5};
constexpr auto kSeedShiftFirst{6};
constexpr auto kSeedShiftSecond{2};
return kSeedStart + (seed << kSeedShiftFirst) + (seed >> kSeedShiftSecond);
}
} // namespace clanguml::util