Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement to use .base() means the conversion is still explicit.
This commit is contained in:
@@ -83,8 +83,8 @@ static void _DoCommandReturnBuildBridge1(class ScriptInstance *instance)
|
||||
|
||||
switch (vehicle_type) {
|
||||
case ScriptVehicle::VT_ROAD:
|
||||
ScriptObject::SetCallbackVariable(0, static_cast<uint32_t>(start));
|
||||
ScriptObject::SetCallbackVariable(1, static_cast<uint32_t>(end));
|
||||
ScriptObject::SetCallbackVariable(0, start.base());
|
||||
ScriptObject::SetCallbackVariable(1, end.base());
|
||||
return ScriptObject::Command<CMD_BUILD_BRIDGE>::Do(&::_DoCommandReturnBuildBridge1, end, start, TRANSPORT_ROAD, bridge_id, ScriptRoad::GetCurrentRoadType());
|
||||
case ScriptVehicle::VT_RAIL:
|
||||
return ScriptObject::Command<CMD_BUILD_BRIDGE>::Do(end, start, TRANSPORT_RAIL, bridge_id, ScriptRail::GetCurrentRailType());
|
||||
|
||||
Reference in New Issue
Block a user