[vlc-commits] commit: C++: use prefix iterators instead of postfix. ( Rémi Duraffort )

git at videolan.org git at videolan.org
Mon Nov 15 18:23:07 CET 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Nov 12 10:57:39 2010 +0100| [30a0aa26b0aac7166e90c94d6f76b7d2b5682a34] | committer: Rémi Duraffort 

C++: use prefix iterators instead of postfix.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30a0aa26b0aac7166e90c94d6f76b7d2b5682a34
---

 modules/demux/mkv/chapters.cpp                     |    2 +-
 modules/demux/mkv/matroska_segment.cpp             |    6 +++---
 modules/gui/qt4/components/epg/EPGWidget.cpp       |    2 +-
 .../gui/qt4/components/playlist/playlist_model.cpp |    2 +-
 modules/gui/skins2/src/theme_loader.cpp            |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/demux/mkv/chapters.cpp b/modules/demux/mkv/chapters.cpp
index dfcaa30..5b44e0d 100644
--- a/modules/demux/mkv/chapters.cpp
+++ b/modules/demux/mkv/chapters.cpp
@@ -383,7 +383,7 @@ mtime_t chapter_edition_c::Duration() const
     if ( sub_chapters.size() )
     {
         std::vector<chapter_item_c*>::const_iterator index = sub_chapters.end();
-        index--;
+        --index;
         i_result = (*index)->i_user_end_time;
     }
  
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 977bf84..a91aeda 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -70,19 +70,19 @@ matroska_segment_c::~matroska_segment_c()
     while ( index != stored_editions.end() )
     {
         delete (*index);
-        index++;
+        ++index;
     }
     std::vector<chapter_translation_c*>::iterator indext = translations.begin();
     while ( indext != translations.end() )
     {
         delete (*indext);
-        indext++;
+        ++indext;
     }
     std::vector<KaxSegmentFamily*>::iterator indexf = families.begin();
     while ( indexf != families.end() )
     {
         delete (*indexf);
-        indexf++;
+        ++indexf;
    }
 }
 
diff --git a/modules/gui/qt4/components/epg/EPGWidget.cpp b/modules/gui/qt4/components/epg/EPGWidget.cpp
index 3bc91ac..6fc743b 100644
--- a/modules/gui/qt4/components/epg/EPGWidget.cpp
+++ b/modules/gui/qt4/components/epg/EPGWidget.cpp
@@ -124,7 +124,7 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
         {
             m_epgView->delEvent( item );
             delete item;
-            i--;
+            --i;
             m_events.erase( i + 1 );
         }
         else
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 1f91c23..24bf638 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -553,7 +553,7 @@ PLItem * PLModel::findInner( PLItem *root, int i_id, bool b_input ) const
             if( childFound )
                 return childFound;
         }
-        it++;
+        ++it;
     }
     return NULL;
 }
diff --git a/modules/gui/skins2/src/theme_loader.cpp b/modules/gui/skins2/src/theme_loader.cpp
index 7a67113..7696026 100644
--- a/modules/gui/skins2/src/theme_loader.cpp
+++ b/modules/gui/skins2/src/theme_loader.cpp
@@ -296,7 +296,7 @@ bool ThemeLoader::extract( const string &fileName )
             // Look for winamp2.xml in the resource path
             list<string> resPath = pOsFactory->getResourcePath();
             list<string>::const_iterator it;
-            for( it = resPath.begin(); it != resPath.end(); it++ )
+            for( it = resPath.begin(); it != resPath.end(); ++it )
             {
                 if( findFile( *it, WINAMP2_XML_FILE, xmlFile ) )
                     break;



More information about the vlc-commits mailing list