[vlc-commits] demux: mkv: fix type and c++ type cast
Francois Cartegnie
git at videolan.org
Fri Sep 26 20:55:48 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep 26 19:55:33 2014 +0200| [aaebd49a151fae2fd86242dadd3e6e93cbb41e3b] | committer: Francois Cartegnie
demux: mkv: fix type and c++ type cast
kills that signed / unsigned comparison warning
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aaebd49a151fae2fd86242dadd3e6e93cbb41e3b
---
modules/demux/mkv/matroska_segment.hpp | 2 +-
modules/demux/mkv/virtual_segment.cpp | 2 +-
modules/demux/mkv/virtual_segment.hpp | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/demux/mkv/matroska_segment.hpp b/modules/demux/mkv/matroska_segment.hpp
index afb37db..9245c58 100644
--- a/modules/demux/mkv/matroska_segment.hpp
+++ b/modules/demux/mkv/matroska_segment.hpp
@@ -122,7 +122,7 @@ public:
/* when you remove this variable the compiler issues an atomicity error */
/* this variable only works when using std::vector<chapter_edition_c> */
std::vector<chapter_edition_c*> stored_editions;
- int i_default_edition;
+ std::vector<chapter_edition_c*>::size_type i_default_edition;
std::vector<chapter_translation_c*> translations;
std::vector<KaxSegmentFamily*> families;
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index a588cdc..922b686 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -261,7 +261,7 @@ void virtual_edition_c::retimeChapters()
virtual_segment_c::virtual_segment_c( std::vector<matroska_segment_c*> * p_opened_segments )
{
/* Main segment */
- size_t i;
+ std::vector<chapter_edition_c*>::size_type i;
matroska_segment_c *p_segment = (*p_opened_segments)[0];
i_current_edition = 0;
i_sys_title = 0;
diff --git a/modules/demux/mkv/virtual_segment.hpp b/modules/demux/mkv/virtual_segment.hpp
index c901e44..5e659cd 100644
--- a/modules/demux/mkv/virtual_segment.hpp
+++ b/modules/demux/mkv/virtual_segment.hpp
@@ -114,14 +114,14 @@ public:
virtual_segment_c( std::vector<matroska_segment_c*> * opened_segments );
~virtual_segment_c();
std::vector<virtual_edition_c*> editions;
- int i_current_edition;
+ std::vector<virtual_edition_c*>::size_type i_current_edition;
virtual_chapter_c *p_current_chapter;
int i_sys_title;
inline virtual_edition_c * CurrentEdition()
{
- if( i_current_edition >= 0 && (size_t) i_current_edition < editions.size() )
+ if( i_current_edition > 0 && i_current_edition < editions.size() )
return editions[i_current_edition];
return NULL;
}
More information about the vlc-commits
mailing list