summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-10 18:56:51 +0000
committerrubidium <rubidium@openttd.org>2007-01-10 18:56:51 +0000
commita7d0cdf95fd8847ab76b35446e1c9b77f8ef1cb7 (patch)
tree1a1c59c13ddb1d152052f3a3a0bcffe4fb531173 /src/industry_gui.cpp
parentce75f6549dd379b506c9f1e9383bd881aa7cf5c7 (diff)
downloadopenttd-a7d0cdf95fd8847ab76b35446e1c9b77f8ef1cb7.tar.xz
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 3e481ef88..7247036a4 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -16,6 +16,7 @@
#include "industry.h"
#include "town.h"
#include "variables.h"
+#include "helpers.hpp"
const byte _build_industry_types[4][12] = {
{ 1, 2, 4, 6, 8, 0, 3, 5, 9, 11, 18 },
@@ -559,7 +560,7 @@ static void MakeSortedIndustryList(void)
if (GetNumIndustries() == 0) return;
/* Create array for sorting */
- _industry_sort = realloc((void *)_industry_sort, (GetMaxIndustryIndex() + 1) * sizeof(_industry_sort[0]));
+ ReallocT(&_industry_sort, GetMaxIndustryIndex() + 1);
if (_industry_sort == NULL) error("Could not allocate memory for the industry-sorting-list");
FOR_ALL_INDUSTRIES(i) _industry_sort[n++] = i;