summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-09-20 23:11:01 +0000
committersmatz <smatz@openttd.org>2009-09-20 23:11:01 +0000
commit114d48e492cc38644c0c020c6a30ab6c57179862 (patch)
tree80044362459c1f30b75b8eb8d9020f318d3ce5fb /src/tunnelbridge_cmd.cpp
parente07efc2370b0c846f792a4f5d3f8695c21895583 (diff)
downloadopenttd-114d48e492cc38644c0c020c6a30ab6c57179862.tar.xz
(svn r17596) -Codechange: constify some tables
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 08494c51f..a94620ee5 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -322,13 +322,13 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
if (transport_type == TRANSPORT_WATER && (tileh_start == SLOPE_FLAT || tileh_end == SLOPE_FLAT)) return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
- TileIndex Heads[] = {tile_start, tile_end};
+ const TileIndex heads[] = {tile_start, tile_end};
for (int i = 0; i < 2; i++) {
- if (MayHaveBridgeAbove(Heads[i])) {
- if (IsBridgeAbove(Heads[i])) {
- TileIndex north_head = GetNorthernBridgeEnd(Heads[i]);
+ if (MayHaveBridgeAbove(heads[i])) {
+ if (IsBridgeAbove(heads[i])) {
+ TileIndex north_head = GetNorthernBridgeEnd(heads[i]);
- if (direction == GetBridgeAxis(Heads[i])) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
+ if (direction == GetBridgeAxis(heads[i])) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
if (z_start + TILE_HEIGHT == GetBridgeHeight(north_head)) {
return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);