mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
⚡ string move overload
This commit is contained in:
parent
da89d390ea
commit
175976e796
2 changed files with 5 additions and 0 deletions
|
|
@ -6,4 +6,5 @@ struct xxHashStringGen
|
||||||
{
|
{
|
||||||
XXH64_hash_t operator()(const std::string &str) const noexcept;
|
XXH64_hash_t operator()(const std::string &str) const noexcept;
|
||||||
XXH64_hash_t operator()(std::string_view &&str) const noexcept;
|
XXH64_hash_t operator()(std::string_view &&str) const noexcept;
|
||||||
|
XXH64_hash_t operator()(std::string &&str) const noexcept;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ 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
|
XXH64_hash_t xxHashStringGen::operator()(std::string_view &&str) const noexcept
|
||||||
|
{
|
||||||
|
return XXH3_64bits(str.data(), str.size());
|
||||||
|
}
|
||||||
|
XXH64_hash_t xxHashStringGen::operator()(std::string &&str) const noexcept
|
||||||
{
|
{
|
||||||
return XXH3_64bits(str.data(), str.size());
|
return XXH3_64bits(str.data(), str.size());
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue