Codechange: use TileIndex constructor explicitly

This commit is contained in:
Rubidium
2025-01-01 09:24:26 +01:00
committed by rubidium42
parent fd5f6caed4
commit f55ba40b13
12 changed files with 57 additions and 51 deletions

View File

@@ -99,8 +99,8 @@ static void _DoCommandReturnBuildBridge1(class ScriptInstance *instance)
EnforceDeityOrCompanyModeValid(false);
/* Build the piece of road on the 'start' side of the bridge */
TileIndex end = ScriptObject::GetCallbackVariable(0);
TileIndex start = ScriptObject::GetCallbackVariable(1);
TileIndex end(ScriptObject::GetCallbackVariable(0));
TileIndex start(ScriptObject::GetCallbackVariable(1));
DiagDirection dir_1 = ::DiagdirBetweenTiles(end, start);
DiagDirection dir_2 = ::ReverseDiagDir(dir_1);
@@ -113,8 +113,8 @@ static void _DoCommandReturnBuildBridge1(class ScriptInstance *instance)
EnforceDeityOrCompanyModeValid(false);
/* Build the piece of road on the 'end' side of the bridge */
TileIndex end = ScriptObject::GetCallbackVariable(0);
TileIndex start = ScriptObject::GetCallbackVariable(1);
TileIndex end(ScriptObject::GetCallbackVariable(0));
TileIndex start(ScriptObject::GetCallbackVariable(1));
DiagDirection dir_1 = ::DiagdirBetweenTiles(end, start);
DiagDirection dir_2 = ::ReverseDiagDir(dir_1);