Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 23, 2009, 7:28:48 PM (16 years ago)
Author:
rgrieder
Message:

Add a new core-feature: orxonox_cast<T>()
The functions casts objects like dynamic_cast, but uses the identifier instead for MSVC (much faster) and is just a redirection to dynamic_cast for GCC.
Also replaced almost all dynamic_casts (of course only those related to the class hierarchy).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/orxonox/objects/Scene.cc

    r3196 r3223  
    326326        // get the WorldEntity pointers
    327327        WorldEntity* object0 = (WorldEntity*)colObj0->getUserPointer();
    328         assert(dynamic_cast<WorldEntity*>(object0));
     328        assert(orxonox_cast<WorldEntity>(object0));
    329329        WorldEntity* object1 = (WorldEntity*)colObj1->getUserPointer();
    330         assert(dynamic_cast<WorldEntity*>(object1));
     330        assert(orxonox_cast<WorldEntity>(object1));
    331331
    332332        // false means that bullet will assume we didn't modify the contact
Note: See TracChangeset for help on using the changeset viewer.