🔥🎨🐎 removed substr_view after learning string_view::substr is O(1)

This commit is contained in:
EntireTwix 2021-07-02 22:42:24 -07:00
parent 89ca26b9e6
commit fe98e73319
2 changed files with 7 additions and 2 deletions

View file

@ -4,5 +4,6 @@
struct xxHashStringGen
{
XXH64_hash_t operator()(const std::string_view &str) const noexcept;
XXH64_hash_t operator()(const std::string &str) const noexcept;
XXH64_hash_t operator()(std::string_view str) const noexcept;
};

View file

@ -1,6 +1,10 @@
#include "xxhash_str.h"
XXH64_hash_t xxHashStringGen::operator()(const std::string_view &str) const noexcept
XXH64_hash_t xxHashStringGen::operator()(const std::string &str) const noexcept
{
return XXH3_64bits(str.data(), str.size());
}
XXH64_hash_t xxHashStringGen::operator()(std::string_view str) const noexcept
{
return XXH3_64bits(str.data(), str.size());
}