diff options
author | smatz <smatz@openttd.org> | 2009-02-24 21:32:23 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-02-24 21:32:23 +0000 |
commit | 425fe86a3d0325c06f6fe03d13d3f0a5d07d3470 (patch) | |
tree | b6842890c3df5a6c315f6a53554d9e071a9d0903 /src/vehicle.cpp | |
parent | d73c1fa7bfed01a187e14c4d86cde70e7121c51b (diff) | |
download | openttd-425fe86a3d0325c06f6fe03d13d3f0a5d07d3470.tar.xz |
(svn r15569) -Codechange: replace MallocT + memset( 0 ) calls by CallocT
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 0ca03f3b6..471f5b8c9 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -37,7 +37,6 @@ #include "ai/ai.hpp" #include "core/smallmap_type.hpp" #include "vehiclelist.h" -#include "core/mem_func.hpp" #include "depot_func.h" #include "settings_type.h" @@ -1746,9 +1745,7 @@ FreeUnitIDGenerator::FreeUnitIDGenerator(VehicleType type, CompanyID owner) : ca this->maxid++; // so there is space for last item (with v->unitnumber == maxid) this->maxid++; // this one will always be free (well, it will fail when there are 65535 units, so this overflows) - this->cache = MallocT<bool>(this->maxid); - - MemSetT(this->cache, 0, this->maxid); + this->cache = CallocT<bool>(this->maxid); /* Fill the cache */ FOR_ALL_VEHICLES(v) { |