From 05d705e077cb247ee31e0a61bc410fe2b9183c6a Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 20 Mar 2010 17:58:24 +0000 Subject: (svn r19494) -Codechange: Remove _error_message. --- src/command_type.h | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'src/command_type.h') diff --git a/src/command_type.h b/src/command_type.h index 37b52a94c..a9827f68d 100644 --- a/src/command_type.h +++ b/src/command_type.h @@ -89,16 +89,6 @@ public: return this->expense_type; } - /** - * Sets the global error message *if* this class has one. - * @see _error_message - */ - FORCEINLINE void SetGlobalErrorMessage() const - { - extern StringID _error_message; - if (this->message != INVALID_STRING_ID) _error_message = this->message; - } - /** * Makes this #CommandCost behave like an error command. * @param message The error message. @@ -112,15 +102,12 @@ public: /** * Returns the error message of a command - * @return the error message, if succeeded INVALID_STRING_ID + * @return the error message, if succeeded #INVALID_STRING_ID */ StringID GetErrorMessage() const { - extern StringID _error_message; - if (this->success) return INVALID_STRING_ID; - if (this->message != INVALID_STRING_ID) return this->message; - return _error_message; + return this->message; } /** -- cgit v1.2.3-54-g00ecf