Codechange: use std::unique_ptr to manager GRFErrors in GRFConfig

This commit is contained in:
Rubidium
2023-04-27 20:28:09 +02:00
committed by rubidium42
parent a312a6c1b2
commit f78aa1e720
3 changed files with 9 additions and 16 deletions

View File

@@ -166,7 +166,7 @@ struct GRFConfig : ZeroedMemoryAllocator {
GRFTextWrapper name; ///< NOSAVE: GRF name (Action 0x08)
GRFTextWrapper info; ///< NOSAVE: GRF info (author, copyright, ...) (Action 0x08)
GRFTextWrapper url; ///< NOSAVE: URL belonging to this GRF.
GRFError *error; ///< NOSAVE: Error/Warning during GRF loading (Action 0x0B)
std::unique_ptr<GRFError> error; ///< NOSAVE: Error/Warning during GRF loading (Action 0x0B)
uint32 version; ///< NOSAVE: Version a NewGRF can set so only the newest NewGRF is shown
uint32 min_loadable_version; ///< NOSAVE: Minimum compatible version a NewGRF can define