Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5807


Ignore:
Timestamp:
Sep 27, 2009, 12:53:49 PM (15 years ago)
Author:
rgrieder
Message:
  • Added OrxonoxClass include to the SmartPtr since that is needed in any case.
  • Inserted asserts for operators * and → to avoid segfaults and instead have a clean abort (in debug mode anyway).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/core/SmartPtr.h

    r5805 r5807  
    3434#include "CorePrereqs.h"
    3535
     36#include <cassert>
    3637#include <ostream>
     38#include "OrxonoxClass.h"
    3739
    3840namespace orxonox
     
    112114            inline T* operator->() const
    113115            {
     116                assert(this->pointer_ != 0);
    114117                return this->pointer_;
    115118            }
     
    117120            inline T& operator*() const
    118121            {
     122                assert(this->pointer_ != 0);
    119123                return *this->pointer_;
    120124            }
Note: See TracChangeset for help on using the changeset viewer.