From f7ea675751873b1d2275434362e26cb136c5fab9 Mon Sep 17 00:00:00 2001 From: opera-aberglund Date: Sun, 21 Apr 2024 13:16:42 +0200 Subject: [PATCH] hash_storage: compare values in equality operator --- include/cista/containers/hash_storage.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/cista/containers/hash_storage.h b/include/cista/containers/hash_storage.h index ab6d3845..d6f17217 100644 --- a/include/cista/containers/hash_storage.h +++ b/include/cista/containers/hash_storage.h @@ -654,7 +654,8 @@ struct hash_storage { return false; } for (auto const& el : *this) { - if (b.find(GetKey()(el)) == b.end()) { + auto const it = b.find(GetKey()(el)); + if (it == b.end() || GetValue()(el) != GetValue()(*it)) { return false; } }