Skip to content

Commit

Permalink
Fix clazy temporary-iterator warning
Browse files Browse the repository at this point in the history
Calling constBegin/constEnd on temporary container can result
in endless loop
  • Loading branch information
nyalldawson committed Oct 22, 2016
1 parent 9459831 commit ad13699
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -1106,8 +1106,9 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
QgsDebugMsg( "PROFILE TIMES" );
QgsDebugMsg( QString( "PROFILE TIMES TOTAL - %1 " ).arg( mProfiler->totalTime() ) );
#ifdef QGISDEBUG
QList<QPair<QString, double> >::const_iterator it = mProfiler->profileTimes().constBegin();
for ( ; it != mProfiler->profileTimes().constEnd(); ++it )
QList<QPair<QString, double> > profileTimes = mProfiler->profileTimes();
QList<QPair<QString, double> >::const_iterator it = profileTimes.constBegin();
for ( ; it != profileTimes.constEnd(); ++it )
{
QString name = ( *it ).first;
double time = ( *it ).second;
Expand Down

0 comments on commit ad13699

Please sign in to comment.