summaryrefslogtreecommitdiff
path: root/src/command.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-04-06 14:50:37 +0000
committersmatz <smatz@openttd.org>2008-04-06 14:50:37 +0000
commit54630d07353a59183e4537cdae7c1570bf782199 (patch)
treee6cab465e31bab3bb792b58a20ee6ff52d90c182 /src/command.cpp
parent935b5620744b96c6b44e20e0ea89dc7bdca127c3 (diff)
downloadopenttd-54630d07353a59183e4537cdae7c1570bf782199.tar.xz
(svn r12591) -Codechange: move CommandCost accessors to header file, 8kB of binary size saved
Diffstat (limited to 'src/command.cpp')
-rw-r--r--src/command.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/command.cpp b/src/command.cpp
index c00a40eaa..4b6335744 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -668,52 +668,3 @@ callb_err:
ClearStorageChanges(false);
return false;
}
-
-
-CommandCost CommandCost::AddCost(CommandCost ret)
-{
- this->AddCost(ret.cost);
- if (this->success && !ret.success) {
- this->message = ret.message;
- this->success = false;
- }
- return *this;
-}
-
-CommandCost CommandCost::AddCost(Money cost)
-{
- this->cost += cost;
- return *this;
-}
-
-CommandCost CommandCost::MultiplyCost(int factor)
-{
- this->cost *= factor;
- return *this;
-}
-
-Money CommandCost::GetCost() const
-{
- return this->cost;
-}
-
-ExpensesType CommandCost::GetExpensesType() const
-{
- return this->expense_type;
-}
-
-void CommandCost::SetGlobalErrorMessage() const
-{
- extern StringID _error_message;
- if (this->message != INVALID_STRING_ID) _error_message = this->message;
-}
-
-bool CommandCost::Succeeded() const
-{
- return this->success;
-}
-
-bool CommandCost::Failed() const
-{
- return !this->success;
-}