mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-30 20:05:51 +00:00
fix: address PR reviewer feedback regarding random_shuffle and queue.empty()
This commit is contained in:
@@ -344,7 +344,7 @@ void Socket::SocketInputStreamLocal::close()
|
||||
{
|
||||
m_streamOpen = false;
|
||||
EnterCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
while(!s_hostQueue[m_queueIdx].empty()) s_hostQueue[m_queueIdx].pop();
|
||||
std::queue<uint8_t>().swap(s_hostQueue[m_queueIdx]);
|
||||
LeaveCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ void Socket::SocketOutputStreamLocal::close()
|
||||
{
|
||||
m_streamOpen = false;
|
||||
EnterCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
while(!s_hostQueue[m_queueIdx].empty()) s_hostQueue[m_queueIdx].pop();
|
||||
std::queue<uint8_t>().swap(s_hostQueue[m_queueIdx]);
|
||||
LeaveCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user