Skip to content
Permalink
Browse files

Fix clazy temporary-iterator warning

Calling constBegin/constEnd on temporary container can result
in endless loop
  • Loading branch information
nyalldawson committed Oct 22, 2016
1 parent 9459831 commit ad13699a233d53fd1e62197319b96de5b34e523d
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/qgisapp.cpp
@@ -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;

0 comments on commit ad13699

Please sign in to comment.
You can’t perform that action at this time.