mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-03 08:40:59 +00:00
COMMON: Replace NDEBUG define checks with RELEASE_BUILD
This commit is contained in:
parent
6814b99b67
commit
a689ba0d95
@ -451,7 +451,7 @@ template<class Key, class Val, class HashFunc, class EqualFunc>
|
||||
void HashMap<Key, Val, HashFunc, EqualFunc>::expandStorage(size_type newCapacity) {
|
||||
assert(newCapacity > _mask + 1);
|
||||
|
||||
#ifndef NDEBUG
|
||||
#ifndef RELEASE_BUILD
|
||||
const size_type old_size = _size;
|
||||
#endif
|
||||
const size_type old_mask = _mask;
|
||||
@ -484,9 +484,11 @@ void HashMap<Key, Val, HashFunc, EqualFunc>::expandStorage(size_type newCapacity
|
||||
_size++;
|
||||
}
|
||||
|
||||
#ifndef RELEASE_BUILD
|
||||
// Perform a sanity check: Old number of elements should match the new one!
|
||||
// This check will fail if some previous operation corrupted this hashmap.
|
||||
assert(_size == old_size);
|
||||
#endif
|
||||
|
||||
delete[] old_storage;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user