summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-04-07 20:02:36 +0000
committersmatz <smatz@openttd.org>2008-04-07 20:02:36 +0000
commitf35612bd21374ee0aa77c0a79b6546922d43add0 (patch)
treec2115574a47116b76a0611096c82fda037e9a4b4
parentcf250390c5bd2a4980197b1801630fac80944fd3 (diff)
downloadopenttd-f35612bd21374ee0aa77c0a79b6546922d43add0.tar.xz
(svn r12616) -Codechange: r12591 didn't work as expected for NDS, move one function back to cpp
-rw-r--r--src/command.cpp11
-rw-r--r--src/command_type.h10
2 files changed, 12 insertions, 9 deletions
diff --git a/src/command.cpp b/src/command.cpp
index 4b6335744..7bf1b8cba 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -668,3 +668,14 @@ 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;
+}
diff --git a/src/command_type.h b/src/command_type.h
index 2f3fe2947..da310fe4e 100644
--- a/src/command_type.h
+++ b/src/command_type.h
@@ -49,15 +49,7 @@ public:
* @param ret the command to add the cost of.
* @return this class.
*/
- CommandCost AddCost(CommandCost ret)
- {
- this->AddCost(ret.cost);
- if (this->success && !ret.success) {
- this->message = ret.message;
- this->success = false;
- }
- return *this;
- }
+ CommandCost AddCost(CommandCost ret);
/**
* Adds the given cost to the cost of the command.