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:
@@ -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{});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user