mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 20:24:12 +01:00
Codechange: Use std::ranges::find where possible.
Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
This commit is contained in:
committed by
Peter Nelson
parent
1f18894408
commit
3be0166801
@@ -490,7 +490,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
bool can_build = CanBuildVehicleInfrastructure(VEH_TRAIN);
|
||||
if (can_build) return false;
|
||||
|
||||
if (std::find(std::begin(can_build_widgets), std::end(can_build_widgets), widget) == std::end(can_build_widgets)) return false;
|
||||
if (std::ranges::find(can_build_widgets, widget) == std::end(can_build_widgets)) return false;
|
||||
|
||||
GuiShowTooltips(this, STR_TOOLBAR_DISABLED_NO_VEHICLE_AVAILABLE, close_cond);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user