From d0d065d70428a3ef699a1d125f493d79683b3295 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 25 Apr 2025 12:33:47 +0200 Subject: replace local equal_to_2 with eastl impl (#368) --- src/zenstore/cache/cachedisklayer.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/zenstore/cache/cachedisklayer.cpp') 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 -struct equal_to_2 -{ - constexpr bool operator()(const T& a, const U& b) const { return a == b; } - - template, eastl::remove_const_t>>> - 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(), equal_to_2()); + if (auto It = m_Buckets.find_as(InBucket, std::hash(), eastl::equal_to_2()); It != m_Buckets.end()) { return It->second.get(); @@ -3604,7 +3590,7 @@ ZenCacheDiskLayer::GetOrCreateBucket(std::string_view InBucket) std::unique_ptr Bucket(std::make_unique(m_Gc, m_TotalMemCachedSize, InBucket, m_Configuration.BucketConfig)); RwLock::ExclusiveLockScope Lock(m_Lock); - if (auto It = m_Buckets.find_as(InBucket, std::hash(), equal_to_2()); + if (auto It = m_Buckets.find_as(InBucket, std::hash(), eastl::equal_to_2()); It != m_Buckets.end()) { return It->second.get(); -- cgit v1.2.3