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