Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 18, 2012, 9:54:49 PM (12 years ago)
Author:
landauf
Message:

simplified code a little by using MultiType instead of explicit conversion

File:
1 edited

Legend:

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

    r9279 r9305  
    8383    void ShrinkPickup::initializeIdentifier(void)
    8484    {
    85         std::stringstream stream;
    86         stream << this->getShrinkFactor();
    87         std::string type1 = "shrinkFactor";
    88         std::string val1 = stream.str();
    89         this->pickupIdentifier_->addParameter(type1, val1);
    90 
    91         stream.clear();
    92         stream << this->getDuration();
    93         std::string val2 = stream.str();
    94         std::string type2 = "duration";
    95         this->pickupIdentifier_->addParameter(type2, val2);
    96 
    97         stream.clear();
    98         stream << this->getShrinkDuration();
    99         std::string val3 = stream.str();
    100         std::string type3 = "shrinkDuration";
    101         this->pickupIdentifier_->addParameter(type3, val3);
     85        this->pickupIdentifier_->addParameter("shrinkFactor", this->getShrinkFactor());
     86        this->pickupIdentifier_->addParameter("duration", this->getDuration());
     87        this->pickupIdentifier_->addParameter("shrinkDuration", this->getShrinkDuration());
    10288    }
    10389
Note: See TracChangeset for help on using the changeset viewer.