diff options
author | Rubidium <rubidium@openttd.org> | 2021-04-17 09:59:18 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-04-17 22:24:52 +0200 |
commit | 4400bbfa964dd6353f0cf7591f6be6a789039399 (patch) | |
tree | f0b6c699b81c8fa81b0f95948774cea832c12a28 /src/script/script_fatalerror.hpp | |
parent | 3248a6c12b27801d44fbb67b405d204d10672c9f (diff) | |
download | openttd-4400bbfa964dd6353f0cf7591f6be6a789039399.tar.xz |
Change: [Script] Let Script_FatalError use std::string instead of const char *
Diffstat (limited to 'src/script/script_fatalerror.hpp')
-rw-r--r-- | src/script/script_fatalerror.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/script_fatalerror.hpp b/src/script/script_fatalerror.hpp index 5d1a2c125..96c64e0b9 100644 --- a/src/script/script_fatalerror.hpp +++ b/src/script/script_fatalerror.hpp @@ -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 */ |