Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2015, 11:22:03 PM (9 years ago)
Author:
landauf
Message:

use actual types instead of 'auto'. only exception is for complicated template types, e.g. when iterating over a map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc

    r10821 r10916  
    6565        {
    6666            // Delete all children
    67             for (auto & elem : this->attachedShapes_)
     67            for (auto& mapEntry : this->attachedShapes_)
    6868            {
    6969                // make sure that the child doesn't want to detach itself --> speedup because of the missing update
    70                 elem.first->notifyDetached();
    71                 elem.first->destroy();
    72                 if (this->collisionShape_ == elem.second)
     70                mapEntry.first->notifyDetached();
     71                mapEntry.first->destroy();
     72                if (this->collisionShape_ == mapEntry.second)
    7373                    this->collisionShape_ = nullptr; // don't destroy it twice
    7474            }
     
    246246    {
    247247        unsigned int i = 0;
    248         for (const auto & elem : this->attachedShapes_)
     248        for (const auto& mapEntry : this->attachedShapes_)
    249249        {
    250250            if (i == index)
    251                 return elem.first;
     251                return mapEntry.first;
    252252            ++i;
    253253        }
     
    266266        std::vector<CollisionShape*> shapes;
    267267        // Iterate through all attached CollisionShapes and add them to the list of shapes.
    268         for(auto & elem : this->attachedShapes_)
    269             shapes.push_back(elem.first);
     268        for(auto& mapEntry : this->attachedShapes_)
     269            shapes.push_back(mapEntry.first);
    270270
    271271        // Delete the compound shape and create a new one.
     
    274274
    275275        // Re-attach all CollisionShapes.
    276         for(auto shape : shapes)
    277         {
    278            
     276        for(CollisionShape* shape : shapes)
     277        {
    279278            shape->setScale3D(this->getScale3D());
    280279            // Only actually attach if we didn't pick a CompoundCollisionShape with no content.
Note: See TracChangeset for help on using the changeset viewer.