diff options
author | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
commit | 33be1ecfb1a9056b027d50d7b558cff87c5b744d (patch) | |
tree | d644a3831ca0947198b191fa3e4e8973d3a9786e /src/fios.cpp | |
parent | 91ff74641060445dc1647bbf05baeb03b45c3099 (diff) | |
download | openttd-33be1ecfb1a9056b027d50d7b558cff87c5b744d.tar.xz |
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
Diffstat (limited to 'src/fios.cpp')
-rw-r--r-- | src/fios.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fios.cpp b/src/fios.cpp index 87e7ea93d..a833426a3 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -48,7 +48,7 @@ FiosItem *FiosAlloc(void) { if (_fios_count == _fios_alloc) { _fios_alloc += 256; - ReallocT(&_fios_items, _fios_alloc); + _fios_items = ReallocT(_fios_items, _fios_alloc); } return &_fios_items[_fios_count++]; } @@ -324,7 +324,7 @@ FiosItem *FiosGetSavegameList(int mode) static char *_fios_save_path = NULL; if (_fios_save_path == NULL) { - MallocT(&_fios_save_path, MAX_PATH); + _fios_save_path = MallocT<char>(MAX_PATH); ttd_strlcpy(_fios_save_path, _paths.save_dir, MAX_PATH); } @@ -372,7 +372,7 @@ FiosItem *FiosGetScenarioList(int mode) static char *_fios_scn_path = NULL; if (_fios_scn_path == NULL) { - MallocT(&_fios_scn_path, MAX_PATH); + _fios_scn_path = MallocT<char>(MAX_PATH); ttd_strlcpy(_fios_scn_path, _paths.scenario_dir, MAX_PATH); } @@ -403,7 +403,7 @@ FiosItem *FiosGetHeightmapList(int mode) static char *_fios_hmap_path = NULL; if (_fios_hmap_path == NULL) { - MallocT(&_fios_hmap_path, MAX_PATH); + _fios_hmap_path = MallocT<char>(MAX_PATH); strcpy(_fios_hmap_path, _paths.heightmap_dir); } |