1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +01:00

Codechange: Add AssignBit function to assign the value of a single bit (#12934)

* Codechange: Add AssignBit function to assign the value of a single bit

* Codechange: Replace various uses of SB with AssignBit

* Codechange: Replace various uses of SB with a constant with SetBit
This commit is contained in:
Jonathan G Rennison
2024-09-10 13:36:58 +01:00
committed by GitHub
parent 27efa57b7b
commit e477706bf5
18 changed files with 48 additions and 29 deletions

View File

@@ -987,7 +987,7 @@ CommandCost CmdSetVehicleVisibility(DoCommandFlag flags, EngineID engine_id, boo
if (!IsEngineBuildable(e->index, e->type, _current_company)) return CMD_ERROR;
if ((flags & DC_EXEC) != 0) {
SB(e->company_hidden, _current_company, 1, hide ? 1 : 0);
AssignBit(e->company_hidden, _current_company, hide);
AddRemoveEngineFromAutoreplaceAndBuildWindows(e->type);
}