(svn r12616) -Codechange: r12591 didn't work as expected for NDS, move one function back to cpp
authorsmatz
Mon, 07 Apr 2008 20:02:36 +0000
changeset 10080 e0a9b92ed875
parent 10079 99aba130db3c
child 10081 e46b9eb2f9c1
(svn r12616) -Codechange: r12591 didn't work as expected for NDS, move one function back to cpp
src/command.cpp
src/command_type.h
--- a/src/command.cpp	Mon Apr 07 19:18:56 2008 +0000
+++ b/src/command.cpp	Mon Apr 07 20:02:36 2008 +0000
@@ -668,3 +668,14 @@
 	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;
+}
--- a/src/command_type.h	Mon Apr 07 19:18:56 2008 +0000
+++ b/src/command_type.h	Mon Apr 07 20:02:36 2008 +0000
@@ -49,15 +49,7 @@
 	 * @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.