[vlc-commits] adaptive: Use std::string::npos instead of a literal -1

Hugo Beauzée-Luyssen git at videolan.org
Fri Dec 4 10:43:35 UTC 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Dec  3 03:47:45 2020 -0800| [eaebf7d18c332316b89a8a1e550cae241a42b3eb] | committer: Hugo Beauzée-Luyssen

adaptive: Use std::string::npos instead of a literal -1

MSVC complains about a negative number being assigned to an unsigned
variable

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

 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;



More information about the vlc-commits mailing list