Codechange: ToWindowNumber describes better what is the intent than Pack

This commit is contained in:
Rubidium
2025-02-01 21:15:26 +01:00
committed by rubidium42
parent 6b7cb4ede3
commit 5a78bb8fac
13 changed files with 31 additions and 30 deletions

View File

@@ -842,7 +842,7 @@ CommandCost CmdSetAutoReplace(DoCommandFlag flags, GroupID id_g, EngineID old_en
if (IsLocalCompany()) SetWindowDirty(WC_REPLACE_VEHICLE, Engine::Get(old_engine_type)->type);
const VehicleType vt = Engine::Get(old_engine_type)->type;
SetWindowDirty(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack());
SetWindowDirty(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).ToWindowNumber());
}
if ((flags & DC_EXEC) && IsLocalCompany()) InvalidateAutoreplaceWindow(old_engine_type, id_g);