Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3040


Ignore:
Timestamp:
May 24, 2009, 9:43:45 PM (16 years ago)
Author:
landauf
Message:

added 2 typedefs in PickupCollection.cc to replace _Pairii which isn't supported by gcc.

Location:
code/branches/pickups2/src/orxonox/objects/pickup
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.cc

    r3016 r3040  
    4545namespace orxonox
    4646{
     47    typedef std::pair<std::multimap<std::string, BaseItem*>::iterator, std::multimap<std::string, BaseItem*>::iterator> item_range;
     48    typedef std::pair<std::multimap<ModifierType::Enum, float>::iterator, std::multimap<ModifierType::Enum, float>::iterator> modifier_range;
     49
    4750    //! Constructor
    4851    PickupCollection::PickupCollection()
     
    5558        @brief
    5659            Add an item to the collection.
    57            
     60
    5861            Only adds the item if there's a free slot for it.
    5962
     
    122125        else
    123126        {
    124             std::multimap<std::string, BaseItem*>::_Pairii bounds = this->items_.equal_range(item->getPickupIdentifier());
     127            item_range bounds = this->items_.equal_range(item->getPickupIdentifier());
    125128            for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++)
    126129            {
     
    174177        else
    175178        {
    176             std::multimap<std::string, BaseItem*>::_Pairii bounds = this->items_.equal_range(item->getPickupIdentifier());
     179            item_range bounds = this->items_.equal_range(item->getPickupIdentifier());
    177180            for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++)
    178181            {
     
    193196            else
    194197                this->currentUsable_ = NULL;
    195            
     198
    196199        }
    197200    }
     
    214217        float v = 0.0f;
    215218
    216         std::multimap<ModifierType::Enum, float>::_Pairii range = this->additiveModifiers_.equal_range(type);
     219        modifier_range range = this->additiveModifiers_.equal_range(type);
    217220
    218221        for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
     
    230233    void PickupCollection::removeAdditiveModifier(ModifierType::Enum type, float value)
    231234    {
    232         std::multimap<ModifierType::Enum, float>::_Pairii range = this->additiveModifiers_.equal_range(type);
     235        modifier_range range = this->additiveModifiers_.equal_range(type);
    233236        for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
    234237        {
     
    258261        float v = 1.0f;
    259262
    260         std::multimap<ModifierType::Enum, float>::_Pairii range = this->multiplicativeModifiers_.equal_range(type);
     263        modifier_range range = this->multiplicativeModifiers_.equal_range(type);
    261264        for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    262265        {
     
    273276    void PickupCollection::removeMultiplicativeModifier(ModifierType::Enum type, float value)
    274277    {
    275         std::multimap<ModifierType::Enum, float>::_Pairii range = this->multiplicativeModifiers_.equal_range(type);
     278        modifier_range range = this->multiplicativeModifiers_.equal_range(type);
    276279        for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    277280        {
  • code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.cc

    • Property svn:eol-style set to native
  • code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.h

    • Property svn:eol-style set to native
Note: See TracChangeset for help on using the changeset viewer.