Changeset 3040 for code/branches/pickups2/src/orxonox/objects/pickup
- Timestamp:
- May 24, 2009, 9:43:45 PM (16 years ago)
- 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 45 45 namespace orxonox 46 46 { 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 47 50 //! Constructor 48 51 PickupCollection::PickupCollection() … … 55 58 @brief 56 59 Add an item to the collection. 57 60 58 61 Only adds the item if there's a free slot for it. 59 62 … … 122 125 else 123 126 { 124 std::multimap<std::string, BaseItem*>::_Pairiibounds = this->items_.equal_range(item->getPickupIdentifier());127 item_range bounds = this->items_.equal_range(item->getPickupIdentifier()); 125 128 for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++) 126 129 { … … 174 177 else 175 178 { 176 std::multimap<std::string, BaseItem*>::_Pairiibounds = this->items_.equal_range(item->getPickupIdentifier());179 item_range bounds = this->items_.equal_range(item->getPickupIdentifier()); 177 180 for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++) 178 181 { … … 193 196 else 194 197 this->currentUsable_ = NULL; 195 198 196 199 } 197 200 } … … 214 217 float v = 0.0f; 215 218 216 std::multimap<ModifierType::Enum, float>::_Pairiirange = this->additiveModifiers_.equal_range(type);219 modifier_range range = this->additiveModifiers_.equal_range(type); 217 220 218 221 for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++) … … 230 233 void PickupCollection::removeAdditiveModifier(ModifierType::Enum type, float value) 231 234 { 232 std::multimap<ModifierType::Enum, float>::_Pairiirange = this->additiveModifiers_.equal_range(type);235 modifier_range range = this->additiveModifiers_.equal_range(type); 233 236 for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++) 234 237 { … … 258 261 float v = 1.0f; 259 262 260 std::multimap<ModifierType::Enum, float>::_Pairiirange = this->multiplicativeModifiers_.equal_range(type);263 modifier_range range = this->multiplicativeModifiers_.equal_range(type); 261 264 for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++) 262 265 { … … 273 276 void PickupCollection::removeMultiplicativeModifier(ModifierType::Enum type, float value) 274 277 { 275 std::multimap<ModifierType::Enum, float>::_Pairiirange = this->multiplicativeModifiers_.equal_range(type);278 modifier_range range = this->multiplicativeModifiers_.equal_range(type); 276 279 for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++) 277 280 { -
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.