mirror of https://github.com/OpenTTD/OpenTTD
Cleanup: CodeQL fixes
parent
3ef5783bf9
commit
a48f491f09
|
@ -1405,7 +1405,7 @@ static CommandCost CheckFlatLandRoadStop(TileIndex cur_tile, int &allowed_z, con
|
|||
(!_settings_game.construction.road_stop_on_competitor_road ||
|
||||
/* Disallow breaking end-of-line of someone else
|
||||
* so trams can still reverse on this tile. */
|
||||
HasExactlyOneBit(GetRoadBits(cur_tile, RTT_TRAM)))) {
|
||||
HasExactlyOneBit(GetRoadBits(cur_tile, RTT_TRAM)))) {
|
||||
ret = CheckOwnership(tram_owner);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
|
@ -1492,7 +1492,6 @@ CommandCost CmdBuildRailStation(DoCommandFlags flags, TileIndex tile_org, RailTy
|
|||
TileIndexDiff track_delta = TileOffsByAxis(OtherAxis(axis)); // offset to go to the next track
|
||||
std::vector<uint8_t> layout_buffer;
|
||||
layout_buffer.resize(numtracks * plat_len);
|
||||
//TempBufferST<uint8_t> layout_buffer(numtracks * plat_len);
|
||||
GetStationLayout(&layout_buffer[0], numtracks, plat_len, statspec);
|
||||
|
||||
{
|
||||
|
@ -1501,9 +1500,9 @@ CommandCost CmdBuildRailStation(DoCommandFlags flags, TileIndex tile_org, RailTy
|
|||
for (uint i = 0; i < numtracks; i++) {
|
||||
TileIndex tile = tile_track;
|
||||
for (uint j = 0; j < plat_len; j++) {
|
||||
CommandCost ret = IsRailStationBridgeAboveOk(tile, statspec, *check_layout_ptr++);
|
||||
ret = IsRailStationBridgeAboveOk(tile, statspec, *check_layout_ptr++);
|
||||
if (ret.Failed()) {
|
||||
//return CommandCost::DualErrorMessage(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ret.GetErrorMessage());
|
||||
//return CommandCost::DualErrorMessage(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ret.GetErrorMessage()); //FIXME
|
||||
return ret;
|
||||
}
|
||||
tile += tile_delta;
|
||||
|
|
|
@ -434,10 +434,6 @@ CommandCost CmdBuildBridge(DoCommandFlags flags, TileIndex tile_end, TileIndex t
|
|||
break;
|
||||
|
||||
default:
|
||||
/*if (!(GetStationType(tile) == StationType::Dock && _settings_game.construction.allow_docks_under_bridges)) {
|
||||
CommandCost ret = Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||
if (ret.Failed()) return ret;
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ CommandCost CmdBuildRailWaypoint(DoCommandFlags flags, TileIndex start_tile, Axi
|
|||
layout_ptr.resize(count);
|
||||
if (spec == nullptr) {
|
||||
/* The layout must be 0 for the 'normal' waypoints by design. */
|
||||
//memset(layout_ptr, 0, count);
|
||||
//memset(layout_ptr, 0, count); //FIXME
|
||||
} else {
|
||||
/* But for NewGRF waypoints we like to have their style. */
|
||||
GetStationLayout(&layout_ptr[0], count, 1, spec);
|
||||
|
|
Loading…
Reference in New Issue