Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2015, 1:34:31 PM (10 years ago)
Author:
landauf
Message:

improved output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/util/Singleton.h

    r8858 r10398  
    112112#include "UtilPrereqs.h"
    113113
    114 #include <cassert>
    115114#include <cstring>
     115#include <typeinfo>
     116
     117#include "OrxAssert.h"
    116118
    117119namespace orxonox
     
    134136        static T& getInstance()
    135137        {
    136             assert(T::singletonPtr_s != NULL);
     138            OrxVerify(T::singletonPtr_s != NULL, "T=" << typeid(T).name());
    137139            return *T::singletonPtr_s;
    138140        }
     
    157159        Singleton()
    158160        {
    159             assert(T::singletonPtr_s == NULL);
     161            OrxVerify(T::singletonPtr_s == NULL, "T=" << typeid(T).name());
    160162            T::singletonPtr_s = static_cast<T*>(this);
    161163        }
     
    164166        virtual ~Singleton()
    165167        {
    166             assert(T::singletonPtr_s != NULL);
     168            OrxVerify(T::singletonPtr_s != NULL, "T=" << typeid(T).name());
    167169            T::singletonPtr_s = NULL;
    168170        }
Note: See TracChangeset for help on using the changeset viewer.