diff options
author | alberth <alberth@openttd.org> | 2010-12-24 17:51:46 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-12-24 17:51:46 +0000 |
commit | 96906c1a45ed4e68c0132c2ad918db58c1e68f73 (patch) | |
tree | 36ad810270d16bc53f7ff34603826aa0914e5bc2 /src/rail_gui.cpp | |
parent | 852e647bcc892e3cf65990968b9ad200e83af435 (diff) | |
download | openttd-96906c1a45ed4e68c0132c2ad918db58c1e68f73.tar.xz |
(svn r21628) -Codechange: Remove local variables that just point to global _thd.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 6e39d41d8..79ec40661 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -360,11 +360,10 @@ static void DoRailroadTrack(int mode) static void HandleAutodirPlacement() { - TileHighlightData *thd = &_thd; - int trackstat = thd->drawstyle & HT_DIR_MASK; // 0..5 + int trackstat = _thd.drawstyle & HT_DIR_MASK; // 0..5 - if (thd->drawstyle & HT_RAIL) { // one tile case - GenericPlaceRail(TileVirtXY(thd->selend.x, thd->selend.y), trackstat); + if (_thd.drawstyle & HT_RAIL) { // one tile case + GenericPlaceRail(TileVirtXY(_thd.selend.x, _thd.selend.y), trackstat); return; } @@ -379,11 +378,10 @@ static void HandleAutodirPlacement() */ static void HandleAutoSignalPlacement() { - TileHighlightData *thd = &_thd; - uint32 p2 = GB(thd->drawstyle, 0, 3); // 0..5 + uint32 p2 = GB(_thd.drawstyle, 0, 3); // 0..5 - if ((thd->drawstyle & HT_DRAG_MASK) == HT_RECT) { // one tile case - GenericPlaceSignals(TileVirtXY(thd->selend.x, thd->selend.y)); + if ((_thd.drawstyle & HT_DRAG_MASK) == HT_RECT) { // one tile case + GenericPlaceSignals(TileVirtXY(_thd.selend.x, _thd.selend.y)); return; } @@ -406,7 +404,7 @@ static void HandleAutoSignalPlacement() /* _settings_client.gui.drag_signals_density is given as a parameter such that each user * in a network game can specify his/her own signal density */ - DoCommandP(TileVirtXY(thd->selstart.x, thd->selstart.y), TileVirtXY(thd->selend.x, thd->selend.y), p2, + DoCommandP(TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y), p2, _remove_button_clicked ? CMD_REMOVE_SIGNAL_TRACK | CMD_MSG(STR_ERROR_CAN_T_REMOVE_SIGNALS_FROM) : CMD_BUILD_SIGNAL_TRACK | CMD_MSG(STR_ERROR_CAN_T_BUILD_SIGNALS_HERE), |