From bfe5fb73391a135fbca466e81acb06607fbbb17c Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sat, 27 Sep 2025 18:10:39 +0100 Subject: [PATCH] Codechange: FlatSet's contains() should be const. (#14665) This function does not modify contents, so should be marked const. --- src/core/flatset_type.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/flatset_type.hpp b/src/core/flatset_type.hpp index 2dc42d0b48..b69f1daebf 100644 --- a/src/core/flatset_type.hpp +++ b/src/core/flatset_type.hpp @@ -54,7 +54,7 @@ public: * @param key Key to test. * @return true iff the key exists in the set. */ - bool contains(const Tkey &key) + bool contains(const Tkey &key) const { return std::ranges::binary_search(this->data, key, Tcompare{}); }