Mercurial > hg > openttd
changeset 16847:54ff33a0522f draft
(svn r21581) -Codechange: Fix indenting code style of a few multi-line statements.
author | alberth <alberth@openttd.org> |
---|---|
date | Tue, 21 Dec 2010 16:30:54 +0000 |
parents | 1ed7dbc9c5e4 |
children | 6c09714f4105 |
files | src/rail_gui.cpp |
diffstat | 1 files changed, 14 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -74,11 +74,10 @@ static void GenericPlaceRail(TileIndex tile, int cmd) { DoCommandP(tile, _cur_railtype, cmd, - _remove_button_clicked ? - CMD_REMOVE_SINGLE_RAIL | CMD_MSG(STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK) : - CMD_BUILD_SINGLE_RAIL | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK), - CcPlaySound1E - ); + _remove_button_clicked ? + CMD_REMOVE_SINGLE_RAIL | CMD_MSG(STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK) : + CMD_BUILD_SINGLE_RAIL | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK), + CcPlaySound1E); } static void PlaceRail_N(TileIndex tile) @@ -156,8 +155,8 @@ static void PlaceRail_Depot(TileIndex tile) { DoCommandP(tile, _cur_railtype, _build_depot_direction, - CMD_BUILD_TRAIN_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_TRAIN_DEPOT), - CcRailDepot); + CMD_BUILD_TRAIN_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_TRAIN_DEPOT), + CcRailDepot); } static void PlaceRail_Waypoint(TileIndex tile) @@ -254,8 +253,8 @@ } DoCommandP(tile, p1, 0, CMD_BUILD_SIGNALS | - CMD_MSG((w != NULL && _convert_signal_button) ? STR_ERROR_SIGNAL_CAN_T_CONVERT_SIGNALS_HERE : STR_ERROR_CAN_T_BUILD_SIGNALS_HERE), - CcPlaySound1E); + CMD_MSG((w != NULL && _convert_signal_button) ? STR_ERROR_SIGNAL_CAN_T_CONVERT_SIGNALS_HERE : STR_ERROR_CAN_T_BUILD_SIGNALS_HERE), + CcPlaySound1E); } } @@ -533,10 +532,9 @@ static void DoRailroadTrack(int mode) { DoCommandP(TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y), _cur_railtype | (mode << 4), - _remove_button_clicked ? - CMD_REMOVE_RAILROAD_TRACK | CMD_MSG(STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK) : - CMD_BUILD_RAILROAD_TRACK | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK) - ); + _remove_button_clicked ? + CMD_REMOVE_RAILROAD_TRACK | CMD_MSG(STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK) : + CMD_BUILD_RAILROAD_TRACK | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK)); } static void HandleAutodirPlacement() @@ -587,14 +585,11 @@ /* _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, - _remove_button_clicked ? + 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), - CcPlaySound1E); + CcPlaySound1E); }