aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/cache/cachedisklayer.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-04-25 12:33:47 +0200
committerGitHub Enterprise <[email protected]>2025-04-25 12:33:47 +0200
commitd0d065d70428a3ef699a1d125f493d79683b3295 (patch)
treea6f1a27eacb34561f09e505692480d0dc7b33e24 /src/zenstore/cache/cachedisklayer.cpp
parentfix race in rpcrecorder (#375) (diff)
downloadzen-d0d065d70428a3ef699a1d125f493d79683b3295.tar.xz
zen-d0d065d70428a3ef699a1d125f493d79683b3295.zip
replace local equal_to_2 with eastl impl (#368)
Diffstat (limited to 'src/zenstore/cache/cachedisklayer.cpp')
-rw-r--r--src/zenstore/cache/cachedisklayer.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/zenstore/cache/cachedisklayer.cpp b/src/zenstore/cache/cachedisklayer.cpp
index 4f72a711a..da5038984 100644
--- a/src/zenstore/cache/cachedisklayer.cpp
+++ b/src/zenstore/cache/cachedisklayer.cpp
@@ -3571,20 +3571,6 @@ ZenCacheDiskLayer::~ZenCacheDiskLayer()
}
}
-template<typename T, typename U>
-struct equal_to_2
-{
- constexpr bool operator()(const T& a, const U& b) const { return a == b; }
-
- template<typename T_ = T,
- typename U_ = U,
- typename = eastl::enable_if_t<!eastl::is_same_v<eastl::remove_const_t<T_>, eastl::remove_const_t<U_>>>>
- constexpr bool operator()(const U& b, const T& a) const
- {
- return b == a;
- }
-};
-
ZenCacheDiskLayer::CacheBucket*
ZenCacheDiskLayer::GetOrCreateBucket(std::string_view InBucket)
{
@@ -3592,7 +3578,7 @@ ZenCacheDiskLayer::GetOrCreateBucket(std::string_view InBucket)
{
RwLock::SharedLockScope SharedLock(m_Lock);
- if (auto It = m_Buckets.find_as(InBucket, std::hash<std::string_view>(), equal_to_2<std::string, std::string_view>());
+ if (auto It = m_Buckets.find_as(InBucket, std::hash<std::string_view>(), eastl::equal_to_2<std::string, std::string_view>());
It != m_Buckets.end())
{
return It->second.get();
@@ -3604,7 +3590,7 @@ ZenCacheDiskLayer::GetOrCreateBucket(std::string_view InBucket)
std::unique_ptr<CacheBucket> Bucket(std::make_unique<CacheBucket>(m_Gc, m_TotalMemCachedSize, InBucket, m_Configuration.BucketConfig));
RwLock::ExclusiveLockScope Lock(m_Lock);
- if (auto It = m_Buckets.find_as(InBucket, std::hash<std::string_view>(), equal_to_2<std::string, std::string_view>());
+ if (auto It = m_Buckets.find_as(InBucket, std::hash<std::string_view>(), eastl::equal_to_2<std::string, std::string_view>());
It != m_Buckets.end())
{
return It->second.get();