Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2011, 5:00:20 AM (13 years ago)
Author:
rgrieder
Message:

Replaced code like
bool b = someFunction(); assert(b);
with
OrxVerify(someFunction(), "");
to remove warnings in release mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/ThreadPool.cc

    r7284 r8373  
    2828
    2929#include "ThreadPool.h"
     30
     31#include "util/OrxAssert.h"
    3032#include "Thread.h"
    31 #include <cassert>
    3233
    3334namespace orxonox
     
    4041    ThreadPool::~ThreadPool()
    4142    {
    42         unsigned int a = this->setNrOfThreads(0);
    43         assert(a == 0);
     43        OrxVerify(this->setNrOfThreads(0) == 0, "" );
    4444    }
    4545
     
    8888            if ( ! (*it)->isWorking() )
    8989            {
    90                 bool b = (*it)->evaluateExecutor( executor );
    91                 assert(b); // if b is false then there is some code error
     90                // If that fails, then there is some code error
     91                OrxVerify( (*it)->evaluateExecutor( executor ), "" );
    9292                return true;
    9393            }
     
    9696        {
    9797            addThreads( 1 );
    98             bool b = this->threadPool_.back()->evaluateExecutor( executor ); // access the last element
    99             assert(b);
     98            OrxVerify( this->threadPool_.back()->evaluateExecutor( executor ), "" ); // access the last element
    10099            return true;
    101100        }
Note: See TracChangeset for help on using the changeset viewer.