Core/Netcode: Fix a possible infinite loop after 829be0b82 (which was accidentally merged in this morning)
This commit is contained in:
1 parent
d1378a9c94
commit
8e0be985fd
2 files changed
+19
-4
No files matched your search
@@ -98,13 +98,16 @@ namespace ACE_Based
|
||||
return true;
|
||||
}
|
||||
|
||||
//! Peeks at the top of the queue. Remember to unlock after use.
|
||||
T& peek()
|
||||
//! Peeks at the top of the queue. Check if the queue is empty before calling! Remember to unlock after use if autoUnlock == false.
|
||||
T& peek(bool autoUnlock = false)
|
||||
{
|
||||
lock();
|
||||
|
||||
T& result = _queue.front();
|
||||
|
||||
if (autoUnlock)
|
||||
unlock();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user