[vlmc-devel] C++ 11 style change
Barun Parruck
git at videolan.org
Mon Mar 14 21:31:38 CET 2016
vlmc | branch: master | Barun Parruck <barun.parruck at gmail.com> | Sat Mar 12 14:15:52 2016 +0530| [5a4356f369fbbd4f66381c4f5818893f2fbb7f00] | committer: Hugo Beauzée-Luyssen
C++ 11 style change
Changed a function to use a ranged based for loop to be more compliant with C++ 11 styling.
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/5a4356f369fbbd4f66381c4f5818893f2fbb7f00
---
src/Settings/Settings.cpp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/Settings/Settings.cpp b/src/Settings/Settings.cpp
index c1f97ad..a6635c2 100644
--- a/src/Settings/Settings.cpp
+++ b/src/Settings/Settings.cpp
@@ -201,15 +201,13 @@ Settings::SettingList
Settings::group(const QString &groupName) const
{
QReadLocker lock( &m_rwLock );
- SettingMap::const_iterator it = m_settings.begin();
- SettingMap::const_iterator ed = m_settings.end();
SettingList ret;
QString grp = groupName + '/';
- for ( ; it != ed; ++it )
+ for ( auto s : m_settings )
{
- if ( (*it)->key().startsWith( grp ) )
- ret.push_back( *it );
+ if ( s->key().startsWith( grp ) )
+ ret.push_back( s );
}
return ret;
}
More information about the Vlmc-devel
mailing list