Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 30, 2015, 1:59:38 PM (9 years ago)
Author:
landauf
Message:

using strongly typed enum class in pickups and triggers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/pickup/Pickup.cc

    r9667 r10998  
    7878    void Pickup::initialize(void)
    7979    {
    80         this->activationType_ = pickupActivationType::immediate;
    81         this->durationType_ = pickupDurationType::once;
     80        this->activationType_ = PickupActivationType::immediate;
     81        this->durationType_ = PickupDurationType::once;
    8282    }
    8383
     
    105105        switch(this->getActivationType())
    106106        {
    107             case pickupActivationType::immediate:
     107            case PickupActivationType::immediate:
    108108                return activationTypeImmediate_s;
    109             case pickupActivationType::onUse:
     109            case PickupActivationType::onUse:
    110110                return activationTypeOnUse_s;
    111111            default:
     
    124124        switch(this->getDurationType())
    125125        {
    126             case pickupDurationType::once:
     126            case PickupDurationType::once:
    127127                return durationTypeOnce_s;
    128             case pickupDurationType::continuous:
     128            case PickupDurationType::continuous:
    129129                return durationTypeContinuous_s;
    130130            default:
     
    142142    {
    143143        if(type == Pickup::activationTypeImmediate_s)
    144             this->setActivationType(pickupActivationType::immediate);
     144            this->setActivationType(PickupActivationType::immediate);
    145145        else if(type == Pickup::activationTypeOnUse_s)
    146             this->setActivationType(pickupActivationType::onUse);
     146            this->setActivationType(PickupActivationType::onUse);
    147147        else
    148148            orxout(internal_error, context::pickups) << "Invalid activationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl;
     
    158158    {
    159159        if(type == Pickup::durationTypeOnce_s)
    160             this->setDurationType(pickupDurationType::once);
     160            this->setDurationType(PickupDurationType::once);
    161161        else if(type == Pickup::durationTypeContinuous_s)
    162             this->setDurationType(pickupDurationType::continuous);
     162            this->setDurationType(PickupDurationType::continuous);
    163163        else
    164164            orxout(internal_error, context::pickups) << "Invalid durationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl;
Note: See TracChangeset for help on using the changeset viewer.