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/command_type.h | |
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/command_type.h')
-rw-r--r-- | src/command_type.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/command_type.h b/src/command_type.h index a02ac750f..100a96bc9 100644 --- a/src/command_type.h +++ b/src/command_type.h @@ -50,34 +50,25 @@ public: */ CommandCost(ExpensesType ex_t, Money cst) : expense_type(ex_t), cost(cst), message(INVALID_STRING_ID), success(true) {} - /** - * Adds the cost of the given command return value to this cost. - * Also takes a possible error message when it is set. - * @param ret the command to add the cost of. - * @return this class. - */ - CommandCost AddCost(CommandCost ret); /** * Adds the given cost to the cost of the command. * @param cost the cost to add - * @return this class. */ - CommandCost AddCost(Money cost) + void AddCost(Money cost) { this->cost += cost; - return *this; } + void AddCost(CommandCost ret); + /** * Multiplies the cost of the command by the given factor. * @param factor factor to multiply the costs with - * @return this class */ - CommandCost MultiplyCost(int factor) + void MultiplyCost(int factor) { this->cost *= factor; - return *this; } /** |