[vlc-devel] [PATCH 1/3] adaptive: Use std::string::npos instead of a literal -1

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Dec 3 19:44:06 CET 2020


MSVC complains about a negative number being assigned to an unsigned
variable
---
 modules/demux/dash/mpd/IsoffMainParser.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index 408c61b567..c3553657ea 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -580,7 +580,7 @@ Profile IsoffMainParser::getProfile() const
         urn = root->getAttributeValue("profile"); //The standard spells it the both ways...
 
     size_t pos;
-    size_t nextpos = -1;
+    size_t nextpos = std::string::npos;
     do
     {
         pos = nextpos + 1;
-- 
2.29.2



More information about the vlc-devel mailing list