diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 224e6ca6fc..34febb2d90 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -909,7 +909,7 @@ static void FinaliseEngineArray() } if (e->info.variant_id != EngineID::Invalid()) { - Engine::Get(e->info.variant_id)->display_flags.Set(EngineDisplayFlag::HasVariants).Set(EngineDisplayFlag::IsFolded); + Engine::Get(e->info.variant_id)->display_flags.Set({EngineDisplayFlag::HasVariants, EngineDisplayFlag::IsFolded}); } } } diff --git a/src/newgrf/newgrf_act0_houses.cpp b/src/newgrf/newgrf_act0_houses.cpp index d512666fdf..c73ff6fd6e 100644 --- a/src/newgrf/newgrf_act0_houses.cpp +++ b/src/newgrf/newgrf_act0_houses.cpp @@ -145,7 +145,7 @@ static ChangeInfoResult TownHouseChangeInfo(uint first, uint last, int prop, Byt housespec->random_colour[3] = COLOUR_GREEN; /* House flags 40 and 80 are exceptions; these flags are never set automatically. */ - housespec->building_flags.Reset(BuildingFlag::IsChurch).Reset(BuildingFlag::IsStadium); + housespec->building_flags.Reset({BuildingFlag::IsChurch, BuildingFlag::IsStadium}); /* Make sure that the third cargo type is valid in this * climate. This can cause problems when copying the properties diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index 94af931e8a..f3032be4ac 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -240,7 +240,7 @@ CommandCost CmdBuildObject(DoCommandFlags flags, TileIndex tile, ObjectType type if (!IsWaterTile(t)) { /* Normal water tiles don't have to be cleared. For all other tile types clear * the tile but leave the water. */ - cost.AddCost(Command::Do(DoCommandFlags{flags}.Reset(DoCommandFlag::NoWater).Reset(DoCommandFlag::Execute), t)); + cost.AddCost(Command::Do(DoCommandFlags{flags}.Reset({DoCommandFlag::NoWater, DoCommandFlag::Execute}), t)); } else { /* Can't build on water owned by another company. */ Owner o = GetTileOwner(t); diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp index 65e0c59648..1c2b1e61fb 100644 --- a/src/pathfinder/yapf/yapf_costrail.hpp +++ b/src/pathfinder/yapf/yapf_costrail.hpp @@ -517,8 +517,7 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th end_segment_reason.Set(EndSegmentReason::SafeTile); } else if (HasSignalOnTrackdir(next.tile, ReverseTrackdir(next.td)) && GetSignalType(next.tile, TrackdirToTrack(next.td)) == SIGTYPE_PBS_ONEWAY) { /* Possible safe tile, but not so good as it's the back of a signal... */ - end_segment_reason.Set(EndSegmentReason::SafeTile); - end_segment_reason.Set(EndSegmentReason::DeadEnd); + end_segment_reason.Set({EndSegmentReason::SafeTile, EndSegmentReason::DeadEnd}); extra_cost += Yapf().PfGetSettings().rail_lastred_exit_penalty; } } diff --git a/src/script/api/script_tilelist.cpp b/src/script/api/script_tilelist.cpp index 83596d22bc..4eefa8daca 100644 --- a/src/script/api/script_tilelist.cpp +++ b/src/script/api/script_tilelist.cpp @@ -144,8 +144,8 @@ ScriptTileList_StationType::ScriptTileList_StationType(StationID station_id, Scr if ((station_type & ScriptStation::STATION_TRAIN) != 0) station_types.Set(::StationType::Rail); if ((station_type & ScriptStation::STATION_TRUCK_STOP) != 0) station_types.Set(::StationType::Truck); if ((station_type & ScriptStation::STATION_BUS_STOP) != 0) station_types.Set(::StationType::Bus); - if ((station_type & ScriptStation::STATION_AIRPORT) != 0) station_types.Set(::StationType::Airport).Set(::StationType::Oilrig); - if ((station_type & ScriptStation::STATION_DOCK) != 0) station_types.Set(::StationType::Dock).Set(::StationType::Oilrig); + if ((station_type & ScriptStation::STATION_AIRPORT) != 0) station_types.Set({::StationType::Airport, ::StationType::Oilrig}); + if ((station_type & ScriptStation::STATION_DOCK) != 0) station_types.Set({::StationType::Dock, ::StationType::Oilrig}); TileArea ta(::TileXY(rect->left, rect->top), rect->Width(), rect->Height()); for (TileIndex cur_tile : ta) { diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index e563c1de28..ab76fd4788 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2308,7 +2308,7 @@ CommandCost RemoveRoadWaypointStop(TileIndex tile, DoCommandFlags flags, int rep /* if we deleted the whole waypoint, delete the road facility. */ if (wp->road_waypoint_area.tile == INVALID_TILE) { - wp->facilities.Reset(StationFacility::BusStop).Reset(StationFacility::TruckStop); + wp->facilities.Reset({StationFacility::BusStop, StationFacility::TruckStop}); SetWindowWidgetDirty(WC_STATION_VIEW, wp->index, WID_SV_ROADVEHS); wp->UpdateVirtCoord(); DeleteStationIfEmpty(wp); diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 89bae13ccd..ad41d7f17c 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -139,7 +139,7 @@ std::tuple CmdBuildVehicle(D /* If we are refitting we need to temporarily purchase the vehicle to be able to * test it. */ DoCommandFlags subflags = flags; - if (refitting && !flags.Test(DoCommandFlag::Execute)) subflags.Set(DoCommandFlag::Execute).Set(DoCommandFlag::AutoReplace); + if (refitting && !flags.Test(DoCommandFlag::Execute)) subflags.Set({DoCommandFlag::Execute, DoCommandFlag::AutoReplace}); /* Vehicle construction needs random bits, so we have to save the random * seeds to prevent desyncs. */ diff --git a/src/viewport.cpp b/src/viewport.cpp index 01d6c70897..7950b7d4a2 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1352,7 +1352,7 @@ static Rect ExpandRectWithViewportSignMargins(Rect r, ZoomLevel zoom) static void ViewportAddTownStrings(DrawPixelInfo *dpi, const std::vector &towns, bool small) { ViewportStringFlags flags{}; - if (small) flags.Set(ViewportStringFlag::Small).Set(ViewportStringFlag::Shadow); + if (small) flags.Set({ViewportStringFlag::Small, ViewportStringFlag::Shadow}); StringID stringid = !small && _settings_client.gui.population_in_label ? STR_VIEWPORT_TOWN_POP : STR_TOWN_NAME; for (const Town *t : towns) { diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 559d2e55a3..acd461abba 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -409,7 +409,7 @@ CommandCost CmdBuildRoadWaypoint(DoCommandFlags flags, TileIndex start_tile, Axi } wp->delete_ctr = 0; - wp->facilities.Set(StationFacility::BusStop).Set(StationFacility::TruckStop); + wp->facilities.Set({StationFacility::BusStop, StationFacility::TruckStop}); wp->build_date = TimerGameCalendar::date; wp->string_id = STR_SV_STNAME_WAYPOINT; diff --git a/src/window.cpp b/src/window.cpp index 0e36096d2a..7b3a694ab3 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1837,7 +1837,7 @@ static void DecreaseWindowCounters() if (nwid->type == NWID_HSCROLLBAR || nwid->type == NWID_VSCROLLBAR) { NWidgetScrollbar *sb = static_cast(nwid); if (sb->disp_flags.Any({NWidgetDisplayFlag::ScrollbarUp, NWidgetDisplayFlag::ScrollbarDown})) { - sb->disp_flags.Reset(NWidgetDisplayFlag::ScrollbarUp).Reset(NWidgetDisplayFlag::ScrollbarDown); + sb->disp_flags.Reset({NWidgetDisplayFlag::ScrollbarUp, NWidgetDisplayFlag::ScrollbarDown}); w->mouse_capture_widget = -1; sb->SetDirty(w); }