(svn r19494) -Codechange: Remove _error_message.

This commit is contained in:
alberth
2010-03-20 17:58:24 +00:00
parent a9926e21dc
commit 72d62fd6fc
21 changed files with 8 additions and 173 deletions

View File

@@ -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;
}
/**