Codechange: use std::string for the GRF filenames

This commit is contained in:
Rubidium
2023-04-27 20:42:25 +02:00
committed by rubidium42
parent f78aa1e720
commit 3901ef9760
6 changed files with 24 additions and 33 deletions

View File

@@ -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.