Codechange: use std::variant instead of using bitflags in the value (#11191)

This commit is contained in:
Patric Stout
2023-08-12 18:05:00 +02:00
committed by GitHub
parent a9ed590ca7
commit 0238a2b567
7 changed files with 19 additions and 15 deletions

View File

@@ -2915,7 +2915,7 @@ public:
}
this->FinishInitNested(window_number);
this->owner = v->owner;
this->GetWidget<NWidgetViewport>(WID_VV_VIEWPORT)->InitializeViewport(this, this->window_number | (1 << 31), ScaleZoomGUI(_vehicle_view_zoom_levels[v->type]));
this->GetWidget<NWidgetViewport>(WID_VV_VIEWPORT)->InitializeViewport(this, static_cast<VehicleID>(this->window_number), ScaleZoomGUI(_vehicle_view_zoom_levels[v->type]));
this->GetWidget<NWidgetCore>(WID_VV_START_STOP)->tool_tip = STR_VEHICLE_VIEW_TRAIN_STATUS_START_STOP_TOOLTIP + v->type;
this->GetWidget<NWidgetCore>(WID_VV_RENAME)->tool_tip = STR_VEHICLE_DETAILS_TRAIN_RENAME + v->type;