[vlc-commits] commit: MKV: reduce the scope of the var loop counters ( Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Fri Apr 30 12:52:53 CEST 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Apr 30 12:52:12 2010 +0200| [8ae8da347a32fd6e3e74a2721b079170b925eecf] | committer: Jean-Baptiste Kempf 

MKV: reduce the scope of the var loop counters

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

 modules/demux/mkv/virtual_segment.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index 31c2845..a0bf289 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -33,17 +33,16 @@ void virtual_segment_c::PrepareChapters( )
 
     // !!! should be called only once !!!
     matroska_segment_c *p_segment;
-    size_t i, j;
 
     // copy editions from the first segment
     p_segment = linked_segments[0];
     p_editions = &p_segment->stored_editions;
 
-    for ( i=1 ; i<linked_segments.size(); i++ )
+    for ( size_t i=1 ; i<linked_segments.size(); i++ )
     {
         p_segment = linked_segments[i];
         // FIXME assume we have the same editions in all segments
-        for (j=0; j<p_segment->stored_editions.size(); j++)
+        for ( size_t j=0; j<p_segment->stored_editions.size(); j++)
         {
             if( j >= p_editions->size() ) /* Protect against broken files (?) */
                 break;



More information about the vlc-commits mailing list