From 4e597d8acd60f4e5f1338fb663f6692e2fb759be Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 2 Mar 2018 11:39:52 +1100 Subject: [PATCH] fix stupid return type mistake --- src/common/Util/SpawnIndexAllocator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/Util/SpawnIndexAllocator.h b/src/common/Util/SpawnIndexAllocator.h index 85875a67..65cc826e 100644 --- a/src/common/Util/SpawnIndexAllocator.h +++ b/src/common/Util/SpawnIndexAllocator.h @@ -34,8 +34,6 @@ namespace Util T freeUsedSpawnIndex( ActorIdType actorId ) { - assert( m_maxSlotId != 0 ); - auto it = m_actorIdToAllocatedMap.find( actorId ); if( it == m_actorIdToAllocatedMap.end() ) return 0; @@ -47,7 +45,7 @@ namespace Util return index; } - bool getNextFreeSpawnIndex( ActorIdType actorId ) + T getNextFreeSpawnIndex( ActorIdType actorId ) { assert( m_maxSlotId != 0 ); @@ -82,6 +80,8 @@ namespace Util protected: void setupQueue() { + assert( m_maxSlotId != 0 ); + while( !m_availableIds.empty() ) m_availableIds.pop();