From 4e2e93d4e0cab545ac1273d1c04dfa99fb47a980 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 12 May 2022 10:20:19 +0200 Subject: manual <=> calls for strings in CacheKey --- zenutil/include/zenutil/cache/cachekey.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'zenutil/include') 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; }; -- cgit v1.2.3