[vlmc-devel] commit: SettingsManager: Fixed infinite loop. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Sun Jun 20 19:44:24 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Jun 20 19:44:31 2010 +0200| [5139a1e9c945004d7bda86e2004d3cd0bf80f460] | committer: Hugo Beauzée-Luyssen 

SettingsManager: Fixed infinite loop.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=5139a1e9c945004d7bda86e2004d3cd0bf80f460
---

 src/Settings/SettingsManager.cpp |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/Settings/SettingsManager.cpp b/src/Settings/SettingsManager.cpp
index 290c8fc..6d1bd32 100644
--- a/src/Settings/SettingsManager.cpp
+++ b/src/Settings/SettingsManager.cpp
@@ -160,14 +160,13 @@ SettingsManager::save( QXmlStreamWriter& project ) const
     SettingHash::const_iterator     end = m_xmlSettings.end();
 
     project.writeStartElement( "project" );
-    while ( it != end )
+    for ( ; it != end; ++it )
     {
         if ( ( it.value()->flags() & SettingValue::Private ) != 0 )
             continue ;
         project.writeStartElement( "property" );
         project.writeAttribute( "key", it.key() );
         project.writeAttribute( "value", it.value()->get().toString() );
-        ++it;
         project.writeEndElement();
     }
     project.writeEndElement();



More information about the Vlmc-devel mailing list