diff options
author | alberth <alberth@openttd.org> | 2010-03-20 17:58:24 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-03-20 17:58:24 +0000 |
commit | 05d705e077cb247ee31e0a61bc410fe2b9183c6a (patch) | |
tree | 7c96d4ce3b519c3edc7def2e1769c2ae4d82a334 /src/command_type.h | |
parent | a901ab53925857a3f6ae70a045a9f0ec6362107e (diff) | |
download | openttd-05d705e077cb247ee31e0a61bc410fe2b9183c6a.tar.xz |
(svn r19494) -Codechange: Remove _error_message.
Diffstat (limited to 'src/command_type.h')
-rw-r--r-- | src/command_type.h | 17 |
1 files changed, 2 insertions, 15 deletions
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 @@ -90,16 +90,6 @@ public: } /** - * 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; } /** |