diff options
author | alberth <alberth@openttd.org> | 2010-02-14 15:30:08 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-02-14 15:30:08 +0000 |
commit | e8d40d6a1987220137e386b1f505947de8d8b514 (patch) | |
tree | 34a4e0fcda875f6d15626f8a53de434d90278c56 /src/rail_cmd.cpp | |
parent | 151babee57709529e8db2a3871abc4bf66feb1ec (diff) | |
download | openttd-e8d40d6a1987220137e386b1f505947de8d8b514.tar.xz |
(svn r19128) -Codechange: CommandCost cost methods return void instead of a copy of *this.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 199adc666..56827b8ef 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -493,7 +493,8 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u YapfNotifyTrackLayoutChange(tile, track); } - return cost.AddCost(RailBuildCost(railtype)); + cost.AddCost(RailBuildCost(railtype)); + return cost; } /** Remove a single piece of track @@ -866,7 +867,8 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u YapfNotifyTrackLayoutChange(tile, DiagDirToDiagTrack(dir)); } - return cost.AddCost(_price[PR_BUILD_DEPOT_TRAIN]); + cost.AddCost(_price[PR_BUILD_DEPOT_TRAIN]); + return cost; } /** Build signals, alternate between double/single, signal/semaphore, |