Codechange: Use std::optional for GRF Parameter list.
This commit is contained in:
@@ -153,7 +153,6 @@ struct GRFParameterInfo {
|
||||
struct GRFConfig : ZeroedMemoryAllocator {
|
||||
GRFConfig(const std::string &filename = std::string{});
|
||||
GRFConfig(const GRFConfig &config);
|
||||
~GRFConfig();
|
||||
|
||||
/* Remove the copy assignment, as the default implementation will not do the right thing. */
|
||||
GRFConfig &operator=(GRFConfig &rhs) = delete;
|
||||
@@ -175,7 +174,7 @@ struct GRFConfig : ZeroedMemoryAllocator {
|
||||
uint8 num_params; ///< Number of used parameters
|
||||
uint8 num_valid_params; ///< NOSAVE: Number of valid parameters (action 0x14)
|
||||
uint8 palette; ///< GRFPalette, bitset
|
||||
std::vector<GRFParameterInfo *> param_info; ///< NOSAVE: extra information about the parameters
|
||||
std::vector<std::optional<GRFParameterInfo>> param_info; ///< NOSAVE: extra information about the parameters
|
||||
bool has_param_defaults; ///< NOSAVE: did this newgrf specify any defaults for it's parameters
|
||||
|
||||
struct GRFConfig *next; ///< NOSAVE: Next item in the linked list
|
||||
|
Reference in New Issue
Block a user