]> git.saurik.com Git - apt.git/commitdiff
StringView: pos argument default should be npos
authorJulian Andres Klode <jak@debian.org>
Thu, 7 Jan 2016 19:21:16 +0000 (20:21 +0100)
committerJulian Andres Klode <jak@debian.org>
Thu, 7 Jan 2016 19:21:16 +0000 (20:21 +0100)
Gbp-Dch: ignore

apt-pkg/contrib/string_view.h

index 16f3245977f4d166262eab2591a50b0612ca3b4a..3585da45a18440084aff32de1ed1c3bb6915c0f3 100644 (file)
@@ -55,8 +55,8 @@ public:
         return found - data_;
     }
 
         return found - data_;
     }
 
-    size_t rfind(int c, size_t pos=0) const {
-        if (pos != 0)
+    size_t rfind(int c, size_t pos=npos) const {
+        if (pos != npos)
             return substr(pos).rfind(c);
 
         const char *found = static_cast<const char*>(memrchr(data_, c, size_));
             return substr(pos).rfind(c);
 
         const char *found = static_cast<const char*>(memrchr(data_, c, size_));