Change: [Script] Let Script_FatalError use std::string instead of const char *

This commit is contained in:
Rubidium
2021-04-17 09:59:18 +02:00
committed by Michael Lutz
parent 3248a6c12b
commit 4400bbfa96
3 changed files with 8 additions and 8 deletions

View File

@@ -19,7 +19,7 @@ public:
* Creates a "fatal error" exception.
* @param msg The message describing the cause of the fatal error.
*/
Script_FatalError(const char *msg) :
Script_FatalError(const std::string &msg) :
msg(msg)
{}
@@ -27,10 +27,10 @@ public:
* The error message associated with the fatal error.
* @return The error message.
*/
const char *GetErrorMessage() { return msg; }
const std::string &GetErrorMessage() const { return msg; }
private:
const char *msg; ///< The error message.
const std::string msg; ///< The error message.
};
#endif /* SCRIPT_FATALERROR_HPP */