mkv: Cleaning simplifications
authorHugo Beauzée-Luyssen <beauze.h@gmail.com>
Mon, 17 Oct 2011 15:45:33 +0000 (17:45 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 18 Oct 2011 10:05:39 +0000 (12:05 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/chapter_command.hpp

index 750b341..b334616 100644 (file)
@@ -49,24 +49,9 @@ public:
     virtual ~chapter_codec_cmds_c()
     {
         delete p_private_data;
-        std::vector<KaxChapterProcessData*>::iterator indexe = enter_cmds.begin();
-        while ( indexe != enter_cmds.end() )
-        {
-            delete (*indexe);
-            ++indexe;
-        }
-        std::vector<KaxChapterProcessData*>::iterator indexl = leave_cmds.begin();
-        while ( indexl != leave_cmds.end() )
-        {
-            delete (*indexl);
-            ++indexl;
-        }
-        std::vector<KaxChapterProcessData*>::iterator indexd = during_cmds.begin();
-        while ( indexd != during_cmds.end() )
-        {
-            delete (*indexd);
-            ++indexd;
-        }
+        vlc_delete_all( enter_cmds );
+        vlc_delete_all( leave_cmds );
+        vlc_delete_all( during_cmds );
     }
 
     void SetPrivate( const KaxChapterProcessPrivate & private_data )