Codechange: Use std::ranges::count(_if).

This commit is contained in:
Peter Nelson
2024-11-10 10:53:52 +00:00
committed by Peter Nelson
parent 3be0166801
commit 876d53282e
7 changed files with 10 additions and 10 deletions

View File

@@ -985,7 +985,7 @@ public:
bool HasClassChoice() const override
{
return std::count_if(std::begin(StationClass::Classes()), std::end(StationClass::Classes()), std::not_fn(IsWaypointClass)) > 1;
return std::ranges::count_if(StationClass::Classes(), std::not_fn(IsWaypointClass)) > 1;
}
int GetSelectedClass() const override { return _station_gui.sel_class; }
@@ -1796,7 +1796,7 @@ public:
bool HasClassChoice() const override
{
return std::count_if(std::begin(StationClass::Classes()), std::end(StationClass::Classes()), IsWaypointClass) > 1;
return std::ranges::count_if(StationClass::Classes(), IsWaypointClass) > 1;
}
void Close(int) override { ResetObjectToPlace(); }