summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2007-01-11 17:29:39 +0000
committerKUDr <KUDr@openttd.org>2007-01-11 17:29:39 +0000
commit28e969924b9033f5132fe2ba223e2bcadd39a7ec (patch)
treed644a3831ca0947198b191fa3e4e8973d3a9786e /src/settings.cpp
parent5675956443d4e58713a0abd8cedb4eaaaccf22d4 (diff)
downloadopenttd-28e969924b9033f5132fe2ba223e2bcadd39a7ec.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/settings.cpp')
-rw-r--r--src/settings.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index e6dd5514f..37b1b83f9 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -236,7 +236,7 @@ static IniFile *ini_load(const char *filename)
if (ns > a) {
a = max(a, 128U);
do a*=2; while (a < ns);
- ReallocT(&comment, comment_alloc = a);
+ comment = ReallocT(comment, comment_alloc = a);
}
pos = comment_size;
comment_size += (e - s + 1);
@@ -1509,8 +1509,7 @@ static GRFConfig *GRFLoadConfig(IniFile *ini, const char *grpname, bool is_stati
if (group == NULL) return NULL;
for (item = group->item; item != NULL; item = item->next) {
- GRFConfig *c;
- CallocT(&c, 1);
+ GRFConfig *c = CallocT<GRFConfig>(1);
c->filename = strdup(item->name);
/* Parse parameters */