aboutsummaryrefslogtreecommitdiff
path: root/zenutil
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-05-12 10:20:19 +0200
committerDan Engelbrecht <[email protected]>2022-05-12 10:25:46 +0200
commit4e2e93d4e0cab545ac1273d1c04dfa99fb47a980 (patch)
tree2e1629b705e3cef294a9d98ad5511cfcb342486d /zenutil
parentrevert Bucket - Key parameter change (diff)
downloadzen-4e2e93d4e0cab545ac1273d1c04dfa99fb47a980.tar.xz
zen-4e2e93d4e0cab545ac1273d1c04dfa99fb47a980.zip
manual <=> calls for strings in CacheKey
Diffstat (limited to 'zenutil')
-rw-r--r--zenutil/include/zenutil/cache/cachekey.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/zenutil/include/zenutil/cache/cachekey.h b/zenutil/include/zenutil/cache/cachekey.h
index 9d0a4ba6d..569a31441 100644
--- a/zenutil/include/zenutil/cache/cachekey.h
+++ b/zenutil/include/zenutil/cache/cachekey.h
@@ -21,7 +21,14 @@ struct CacheKey
return {.Namespace = ToLower(Namespace), .Bucket = ToLower(Bucket), .Hash = Hash};
}
- auto operator<=>(const CacheKey&) const = default;
+ auto operator<=>(const CacheKey& that) const
+ {
+ if (auto cmp = Namespace <=> that.Namespace; cmp != 0)
+ return cmp;
+ if (auto cmp = Bucket <=> that.Bucket; cmp != 0)
+ return cmp;
+ return Hash <=> that.Hash;
+ }
static const CacheKey Empty;
};