refactor(Core/Misc): add braces and impove codestyle (#6402)

This commit is contained in:
Kargatum
2021-06-25 00:50:18 +07:00
committed by GitHub
parent 33c271cc7c
commit 3c24b511f2
72 changed files with 1486 additions and 401 deletions

View File

@@ -45,7 +45,9 @@ public:
std::lock_guard<std::mutex> lock(_queueLock);
if (_queue.empty() || _shutdown)
{
return false;
}
value = _queue.front();
@@ -61,10 +63,14 @@ public:
// we could be using .wait(lock, predicate) overload here but it is broken
// https://connect.microsoft.com/VisualStudio/feedback/details/1098841
while (_queue.empty() && !_shutdown)
{
_condition.wait(lock);
}
if (_queue.empty() || _shutdown)
{
return;
}
value = _queue.front();