Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 24, 2011, 2:57:53 PM (14 years ago)
Author:
dafrick
Message:

Improving output.

File:
1 edited

Legend:

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

    r8858 r8864  
    159159    void Pickup::setActivationType(const std::string& type)
    160160    {
    161         if(Pickup::activationTypeImmediate_s.compare(type) == 0)
    162         {
     161        if(type == Pickup::activationTypeImmediate_s)
    163162            this->activationType_ = pickupActivationType::immediate;
    164         }
    165         else if(Pickup::activationTypeOnUse_s.compare(type) == 0)
    166         {
     163        else if(type == Pickup::activationTypeOnUse_s)
    167164            this->activationType_ = pickupActivationType::onUse;
    168         }
    169165        else
    170         {
    171             orxout(internal_error, context::pickups) << "Invalid activationType '" << type << "' in pickup." << endl;
    172         }
     166            orxout(internal_error, context::pickups) << "Invalid activationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl;
    173167    }
    174168
     
    181175    void Pickup::setDurationType(const std::string& type)
    182176    {
    183         if(Pickup::durationTypeOnce_s.compare(type) == 0)
    184         {
     177        if(type == Pickup::durationTypeOnce_s)
    185178            this->durationType_ = pickupDurationType::once;
    186         }
    187         else if(Pickup::durationTypeContinuous_s.compare(type) == 0)
    188         {
     179        else if(type == Pickup::durationTypeContinuous_s)
    189180            this->durationType_ = pickupDurationType::continuous;
    190         }
    191181        else
    192         {
    193             orxout(internal_error, context::pickups) << "Invalid durationType '" << type << "' in pickup." << endl;
    194         }
     182            orxout(internal_error, context::pickups) << "Invalid durationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl;
    195183    }
    196184
Note: See TracChangeset for help on using the changeset viewer.