]> git.sesse.net Git - vlc/commitdiff
mkv: Avoid duplicating the entire vector.
authorHugo Beauzée-Luyssen <beauze.h@gmail.com>
Tue, 24 May 2011 09:43:59 +0000 (11:43 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 20 Jun 2011 08:46:43 +0000 (10:46 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/virtual_segment.cpp
modules/demux/mkv/virtual_segment.hpp

index 836f18de98d5d05489896b3ca939379c222733ed..da65f1803308506d8e53766a8a126ac8944d0f86 100644 (file)
@@ -263,7 +263,7 @@ chapter_item_c *virtual_segment_c::FindChapter( int64_t i_find_uid )
     return NULL;
 }
 
-void virtual_segment_c::AddSegments(std::vector<matroska_segment_c *> segments)
+void virtual_segment_c::AddSegments( const std::vector<matroska_segment_c *> &segments)
 {
     // fill our current virtual segment with all hard linked segments
     size_t i_preloaded;
index fd6e2c959a0706f320c235ad6276f14b3aa878a6..a8c6100a3213b49610762fc6bfd32461bf0d96a2 100644 (file)
@@ -49,7 +49,7 @@ public:
         AppendUID( p_segment->p_next_segment_uid );
     }
 
-    void AddSegments( std::vector<matroska_segment_c*> segments );
+    void AddSegments( const std::vector<matroska_segment_c*> &segments );
 
     void Seek( demux_t & demuxer, mtime_t i_date, mtime_t i_time_offset, chapter_item_c *p_chapter, int64_t i_global_position );