diff --git a/common/hashmap.h b/common/hashmap.h index 70e7550b8ee..70f00d9930f 100644 --- a/common/hashmap.h +++ b/common/hashmap.h @@ -451,7 +451,7 @@ template void HashMap::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::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;