mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 17:19:09 +00:00
(svn r11597) -Change: replace all remaining instances of (re|m|c)alloc with (Re|M|C)allocT and add a check for out-of-memory situations to the *allocT functions.
This commit is contained in:
@@ -310,7 +310,7 @@ void init_Hash(Hash* h, Hash_HashProc* hash, uint num_buckets)
|
||||
h->hash = hash;
|
||||
h->size = 0;
|
||||
h->num_buckets = num_buckets;
|
||||
h->buckets = (HashNode*)malloc(num_buckets * (sizeof(*h->buckets) + sizeof(*h->buckets_in_use)));
|
||||
h->buckets = (HashNode*)MallocT<byte>(num_buckets * (sizeof(*h->buckets) + sizeof(*h->buckets_in_use)));
|
||||
#ifdef HASH_DEBUG
|
||||
debug("Buckets = %p", h->buckets);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user