1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 17:02:37 +01:00

Codechange: FlatSet's contains() should be const. (#14665)

This function does not modify contents, so should be marked const.
This commit is contained in:
Peter Nelson
2025-09-27 18:10:39 +01:00
committed by GitHub
parent 0aaeb6f7e7
commit bfe5fb7339

View File

@@ -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{});
}