mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Fix cppcheck warnings
This commit is contained in:
parent
0597c8fd9c
commit
daa94cc50e
21 changed files with 42 additions and 35 deletions
|
@ -59,7 +59,7 @@ WorkQueue::~WorkQueue()
|
|||
{
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mMutex);
|
||||
while (mQueue.size())
|
||||
while (!mQueue.empty())
|
||||
{
|
||||
WorkItem* item = mQueue.front();
|
||||
delete item;
|
||||
|
@ -88,7 +88,7 @@ osg::ref_ptr<WorkTicket> WorkQueue::addWorkItem(WorkItem *item)
|
|||
WorkItem *WorkQueue::removeWorkItem()
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mMutex);
|
||||
while (!mQueue.size() && !mIsReleased)
|
||||
while (mQueue.empty() && !mIsReleased)
|
||||
{
|
||||
mCondition.wait(&mMutex);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue