mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 08:32:13 +11:00
🔥🎨🐎 removed substr_view after learning string_view::substr is O(1)
This commit is contained in:
parent
89ca26b9e6
commit
fe98e73319
2 changed files with 7 additions and 2 deletions
|
|
@ -4,5 +4,6 @@
|
||||||
|
|
||||||
struct xxHashStringGen
|
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;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
#include "xxhash_str.h"
|
#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());
|
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());
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue