diff options
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) { |