Skip to content

Commit ad13699

Browse files
committedOct 22, 2016
Fix clazy temporary-iterator warning
Calling constBegin/constEnd on temporary container can result in endless loop
1 parent 9459831 commit ad13699

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,8 +1106,9 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
11061106
QgsDebugMsg( "PROFILE TIMES" );
11071107
QgsDebugMsg( QString( "PROFILE TIMES TOTAL - %1 " ).arg( mProfiler->totalTime() ) );
11081108
#ifdef QGISDEBUG
1109-
QList<QPair<QString, double> >::const_iterator it = mProfiler->profileTimes().constBegin();
1110-
for ( ; it != mProfiler->profileTimes().constEnd(); ++it )
1109+
QList<QPair<QString, double> > profileTimes = mProfiler->profileTimes();
1110+
QList<QPair<QString, double> >::const_iterator it = profileTimes.constBegin();
1111+
for ( ; it != profileTimes.constEnd(); ++it )
11111112
{
11121113
QString name = ( *it ).first;
11131114
double time = ( *it ).second;

0 commit comments

Comments
 (0)
Please sign in to comment.