diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-05-17 23:31:54 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-05-21 20:02:34 +0200 |
commit | 9c2e47d03cbc4c7af416a34b09e0c8d0de7c3474 (patch) | |
tree | b1120b42d5021788628550e5792c27cc8deb5dc7 /src/newgrf_config.h | |
parent | c082f570cebd237c35de9caa08fcc84a9c44e95d (diff) | |
download | openttd-9c2e47d03cbc4c7af416a34b09e0c8d0de7c3474.tar.xz |
Codechange: Use std::string for storing GRF error messages.
Diffstat (limited to 'src/newgrf_config.h')
-rw-r--r-- | src/newgrf_config.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/newgrf_config.h b/src/newgrf_config.h index 2c8a8559d..ef7128905 100644 --- a/src/newgrf_config.h +++ b/src/newgrf_config.h @@ -109,16 +109,15 @@ struct GRFIdentifier { }; /** Information about why GRF had problems during initialisation */ -struct GRFError : ZeroedMemoryAllocator { +struct GRFError { GRFError(StringID severity, StringID message = 0); GRFError(const GRFError &error); - ~GRFError(); - char *custom_message; ///< Custom message (if present) - char *data; ///< Additional data for message and custom_message - StringID message; ///< Default message - StringID severity; ///< Info / Warning / Error / Fatal - uint32 param_value[2]; ///< Values of GRF parameters to show for message and custom_message + std::string custom_message; ///< Custom message (if present) + std::string data; ///< Additional data for message and custom_message + StringID message; ///< Default message + StringID severity; ///< Info / Warning / Error / Fatal + uint32 param_value[2]; ///< Values of GRF parameters to show for message and custom_message }; /** The possible types of a newgrf parameter. */ |