Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 4, 2012, 10:50:28 PM (12 years ago)
Author:
landauf
Message:

use orxonox_cast instead of dynamic_cast wherever possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/modules/pickup/PickupSpawner.cc

    r8891 r9279  
    199199
    200200                Vector3 distance = it->getWorldPosition() - this->getWorldPosition();
    201                 PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(*it);
     201                PickupCarrier* carrier = orxonox_cast<PickupCarrier*>(*it);
    202202                // If a PickupCarrier, that fits the target-range of the Pickupable spawned by this PickupSpawner, is in trigger-distance and the carrier is not blocked.
    203203                if(distance.length() < this->triggerDistance_ && carrier != NULL && this->blocked_.find(carrier) == this->blocked_.end())
     
    303303            orxout(verbose, context::pickups) << "PickupSpawner (&" << this << ") triggered and active." << endl;
    304304
    305             PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(pawn);
     305            PickupCarrier* carrier = orxonox_cast<PickupCarrier*>(pawn);
    306306            assert(carrier);
    307307
Note: See TracChangeset for help on using the changeset viewer.