diff options
author | Max Horn | 2009-02-16 01:58:20 +0000 |
---|---|---|
committer | Max Horn | 2009-02-16 01:58:20 +0000 |
commit | 6098cadde3f986e4b5ab250c66a0366078d7ba0b (patch) | |
tree | a6699e5fa72d01026c32ad83d362117b75407471 /common | |
parent | bf6a7c1d72c0c3120c253f1e955d7495860519f4 (diff) | |
download | scummvm-rg350-6098cadde3f986e4b5ab250c66a0366078d7ba0b.tar.gz scummvm-rg350-6098cadde3f986e4b5ab250c66a0366078d7ba0b.tar.bz2 scummvm-rg350-6098cadde3f986e4b5ab250c66a0366078d7ba0b.zip |
More paranoia checks
svn-id: r38339
Diffstat (limited to 'common')
-rw-r--r-- | common/hashmap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/hashmap.h b/common/hashmap.h index d45280133b..bc04c0dbb4 100644 --- a/common/hashmap.h +++ b/common/hashmap.h @@ -431,6 +431,7 @@ int HashMap<Key, Val, HashFunc, EqualFunc>::lookupAndCreateIfMissing(const Key & if (_storage[ctr] == NULL) { _storage[ctr] = allocNode(key); + assert(_storage[ctr] != NULL); _size++; // Keep the load factor below a certain threshold. @@ -439,6 +440,7 @@ int HashMap<Key, Val, HashFunc, EqualFunc>::lookupAndCreateIfMissing(const Key & capacity = capacity < 500 ? (capacity * 4) : (capacity * 2); expandStorage(capacity); ctr = lookup(key); + assert(_storage[ctr] != NULL); } } |