diff --git a/src/newgrf_config.h b/src/newgrf_config.h --- a/src/newgrf_config.h +++ b/src/newgrf_config.h @@ -153,7 +153,7 @@ struct GRFParameterInfo { /** Information about GRF, used in the game and (part of it) in savegames */ struct GRFConfig : ZeroedMemoryAllocator { - GRFConfig(const char *filename = nullptr); + GRFConfig(const std::string &filename = std::string{}); GRFConfig(const GRFConfig &config); ~GRFConfig(); @@ -162,7 +162,7 @@ struct GRFConfig : ZeroedMemoryAllocator GRFIdentifier ident; ///< grfid and md5sum to uniquely identify newgrfs uint8 original_md5sum[16]; ///< MD5 checksum of original file if only a 'compatible' file was loaded - char *filename; ///< Filename - either with or without full path + std::string filename; ///< Filename - either with or without full path GRFTextWrapper name; ///< NOSAVE: GRF name (Action 0x08) GRFTextWrapper info; ///< NOSAVE: GRF info (author, copyright, ...) (Action 0x08) GRFTextWrapper url; ///< NOSAVE: URL belonging to this GRF.