diff options
author | yexo <yexo@openttd.org> | 2010-07-31 09:32:44 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-07-31 09:32:44 +0000 |
commit | 1ca16aa979fab1d7a60fb40def0374433362d265 (patch) | |
tree | 6897f2e35c723031aedf1c44c99c01731b8efa1e /src/newgrf_config.h | |
parent | 24df43633cb1f647f71867512ce4cbc9f9672561 (diff) | |
download | openttd-1ca16aa979fab1d7a60fb40def0374433362d265.tar.xz |
(svn r20248) -Codechange: use a copy-constructor instead of a separate function co clone GRFConfig/GRFError
Diffstat (limited to 'src/newgrf_config.h')
-rw-r--r-- | src/newgrf_config.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_config.h b/src/newgrf_config.h index bdac1868a..0a52f281c 100644 --- a/src/newgrf_config.h +++ b/src/newgrf_config.h @@ -70,6 +70,7 @@ struct GRFIdentifier { /** Information about why GRF had problems during initialisation */ struct GRFError : ZeroedMemoryAllocator { GRFError(StringID severity, StringID message = 0); + GRFError(const GRFError &error); ~GRFError(); char *custom_message; ///< Custom message (if present) @@ -83,6 +84,7 @@ struct GRFError : ZeroedMemoryAllocator { /** Information about GRF, used in the game and (part of it) in savegames */ struct GRFConfig : ZeroedMemoryAllocator { GRFConfig(const char *filename = NULL); + GRFConfig(const GRFConfig &config); ~GRFConfig(); GRFIdentifier ident; ///< grfid and md5sum to uniquely identify newgrfs @@ -123,7 +125,6 @@ void ResetGRFConfig(bool defaults); GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig); bool FillGRFDetails(GRFConfig *config, bool is_static); char *GRFBuildParamList(char *dst, const GRFConfig *c, const char *last); -GRFConfig *DuplicateGRFConfig(const GRFConfig *c); /* In newgrf_gui.cpp */ void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFConfig **config); |