diff options
author | yexo <yexo@openttd.org> | 2010-02-25 20:06:11 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-02-25 20:06:11 +0000 |
commit | 7ff55502f04f9f75b01879ea04518c14d4706046 (patch) | |
tree | f48f911cf9861a0053bd35b92bf1e0ece0a5bf58 /src/newgrf_config.h | |
parent | a9c8dbc0a0e1f1fc4434cf0c83ff658ab8d9e3d9 (diff) | |
download | openttd-7ff55502f04f9f75b01879ea04518c14d4706046.tar.xz |
(svn r19256) -Codechange: use a constructor/destructor for GRFConfig to make sure all members are properly initialized
Diffstat (limited to 'src/newgrf_config.h')
-rw-r--r-- | src/newgrf_config.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/newgrf_config.h b/src/newgrf_config.h index ec587cc1e..9683340dd 100644 --- a/src/newgrf_config.h +++ b/src/newgrf_config.h @@ -69,7 +69,10 @@ struct GRFError : ZeroedMemoryAllocator { }; /** Information about GRF, used in the game and (part of it) in savegames */ -struct GRFConfig { +struct GRFConfig : ZeroedMemoryAllocator { + GRFConfig(const char *filename = NULL); + ~GRFConfig(); + GRFIdentifier ident; ///< grfid and md5sum to uniquely identify newgrfs char *filename; ///< Filename - either with or without full path char *name; ///< NOSAVE: GRF name (Action 0x08) @@ -99,7 +102,6 @@ GRFConfig *GetGRFConfig(uint32 grfid, uint32 mask = 0xFFFFFFFF); GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src, bool init_only); void AppendStaticGRFConfigs(GRFConfig **dst); void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el); -void ClearGRFConfig(GRFConfig **config); void ClearGRFConfigList(GRFConfig **config); void ResetGRFConfig(bool defaults); GRFListCompatibility IsGoodGRFConfigList(); |