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/libraries/util/Serialise.h

    r10916 r10919  
    679679    template <class T> inline void saveAndIncrease(  const std::set<T>& variable, uint8_t*& mem )
    680680    {
    681         typename std::set<T>::const_iterator it = variable.begin();
    682681        saveAndIncrease( (uint32_t)variable.size(), mem );
    683         for( ; it!=variable.end(); ++it )
    684             saveAndIncrease( *it, mem );
     682        for( const T& elem : variable )
     683            saveAndIncrease( elem, mem );
    685684    }
    686685
Note: See TracChangeset for help on using the changeset viewer.