diff options
Diffstat (limited to 'src/server/game/Maps/MapManager.cpp')
-rwxr-xr-x | src/server/game/Maps/MapManager.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index 45aeebd7c47..d2f86917b8b 100755 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -404,16 +404,12 @@ uint32 MapManager::GenerateInstanceId() // Allocate space if necessary if (newInstanceId >= uint32(_instanceIds.size())) { - // DEBUG CODE - TO BE REMOVED OR ENABLED DEPENDING ON THIS ASSERT TRIGGERING - ASSERT(_instanceIds.size() == _instanceIds.capacity()); - - /* + // Due to the odd memory allocation behavior of vector<bool> we match size to capacity before triggering a new allocation if (_instanceIds.size() < _instanceIds.capacity()) { _instanceIds.resize(_instanceIds.capacity()); } else - */ _instanceIds.resize(floor(newInstanceId / 32.0f) * 32 + (newInstanceId % 32 > 0 ? 32 : 0)); } |