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/vehicle_gui.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/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 55dd412ec..7db4ee1c6 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -207,10 +207,8 @@ typedef struct RefitList { static RefitList *BuildRefitList(const Vehicle *v) { uint max_lines = 256; - RefitOption *refit; - CallocT(&refit, max_lines); - RefitList *list; - CallocT(&list, 1); + RefitOption *refit = CallocT<RefitOption>(max_lines); + RefitList *list = CallocT<RefitList>(1); Vehicle *u = (Vehicle*)v; uint num_lines = 0; uint i; |