summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.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/newgrf_gui.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/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 7eb63d722..d5934a433 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -154,7 +154,7 @@ static void NewGRFAddDlgWndProc(Window *w, WindowEvent *e)
case 6: /* Add selection to list */
if (WP(w, newgrf_add_d).sel != NULL) {
const GRFConfig *src = WP(w, newgrf_add_d).sel;
- GRFConfig **list, *c;
+ GRFConfig **list;
/* Find last entry in the list, checking for duplicate grfid on the way */
for (list = WP(w, newgrf_add_d).list; *list != NULL; list = &(*list)->next) {
@@ -165,7 +165,7 @@ static void NewGRFAddDlgWndProc(Window *w, WindowEvent *e)
}
/* Copy GRF details from scanned list */
- CallocT(&c, 1);
+ GRFConfig *c = CallocT<GRFConfig>(1);
*c = *src;
c->filename = strdup(src->filename);
if (src->name != NULL) c->name = strdup(src->name);