diff options
author | tron <tron@openttd.org> | 2005-10-22 06:39:32 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-10-22 06:39:32 +0000 |
commit | 0b936c3222b3945f738885c6c7db3b46363ec6fe (patch) | |
tree | 646e010d91defd66326958b9e15c3eb36077760c /rail_cmd.c | |
parent | 4642ac94a903d1a358ac795240a6b800372b9020 (diff) | |
download | openttd-0b936c3222b3945f738885c6c7db3b46363ec6fe.tar.xz |
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 6e46999e3..1e96b329a 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -448,9 +448,10 @@ int32 CmdRemoveSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (!(flags & DC_EXEC)) return _price.remove_rail; - SetTileOwner(tile, OWNER_NONE); + SetTileOwner(tile, OWNER_NONE); _m[tile].m5 = _m[tile].m5 & 0xC7; break; + case MP_STREET: if (!IsLevelCrossing(tile)) return CMD_ERROR; @@ -472,8 +473,8 @@ int32 CmdRemoveSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2) SetTileOwner(tile, _m[tile].m3); _m[tile].m2 = 0; break; - case MP_RAILWAY: + case MP_RAILWAY: if (!IsPlainRailTile(tile)) return CMD_ERROR; @@ -502,6 +503,7 @@ int32 CmdRemoveSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2) goto skip_mark_dirty; } break; + default: assert(0); } @@ -673,13 +675,12 @@ int32 CmdBuildTrainDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2) */ if (tileh != 0 && ( - _is_old_ai_player || - !_patches.build_on_slopes || - IsSteepTileh(tileh) || - !CanBuildDepotByTileh(p2, tileh) - ) - ) { - return_cmd_error(STR_0007_FLAT_LAND_REQUIRED); + _is_old_ai_player || + !_patches.build_on_slopes || + IsSteepTileh(tileh) || + !CanBuildDepotByTileh(p2, tileh) + )) { + return_cmd_error(STR_0007_FLAT_LAND_REQUIRED); } ret = DoCommandByTile(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); @@ -1783,7 +1784,7 @@ bool SignalVehicleCheck(TileIndex tile, uint track) static void SetSignalsAfterProc(TrackPathFinder *tpf) { SetSignalsData *ssd = tpf->userdata; - TrackPathFinderLink *link; + const TrackPathFinderLink* link; uint offs; uint i; @@ -2125,11 +2126,11 @@ static uint32 GetTileTrackStatus_Track(TileIndex tile, TransportType mode) static void ClickTile_Track(TileIndex tile) { - if (IsTileDepotType(tile, TRANSPORT_RAIL)) + if (IsTileDepotType(tile, TRANSPORT_RAIL)) { ShowTrainDepotWindow(tile); - else if (IsRailWaypoint(_m[tile].m5)) + } else if (IsRailWaypoint(_m[tile].m5)) { ShowRenameWaypointWindow(GetWaypointByTile(tile)); - + } } static void GetTileDesc_Track(TileIndex tile, TileDesc *td) |