From e8d40d6a1987220137e386b1f505947de8d8b514 Mon Sep 17 00:00:00 2001 From: alberth Date: Sun, 14 Feb 2010 15:30:08 +0000 Subject: (svn r19128) -Codechange: CommandCost cost methods return void instead of a copy of *this. --- src/command_type.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/command_type.h') 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; } /** -- cgit v1.2.3-54-g00ecf