Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2015, 10:47:51 PM (9 years ago)
Author:
landauf
Message:

use range-based for-loop where it makes sense (e.g. ObjectList)

File:
1 edited

Legend:

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

    r10917 r10919  
    200200        bool bEmpty = true; // Whether the CompoundCollisionShape is empty.
    201201        // Iterate over all CollisionShapes that belong to this CompoundCollisionShape.
    202         for (std::map<CollisionShape*, btCollisionShape*>::const_iterator it = this->attachedShapes_.begin(); it != this->attachedShapes_.end(); ++it)
     202        for (const auto& mapEntry : this->attachedShapes_)
    203203        {
    204204            // TODO: Make sure this is correct.
    205             if (it->second)
     205            if (mapEntry.second)
    206206            {
    207207                bEmpty = false;
    208                 if (!it->first->hasTransform() && bPrimitive)
    209                     primitive = it->second;
     208                if (!mapEntry.first->hasTransform() && bPrimitive)
     209                    primitive = mapEntry.second;
    210210                else
    211211                {
Note: See TracChangeset for help on using the changeset viewer.