ソースを参照

StringView: pos argument default should be npos

Gbp-Dch: ignore
Julian Andres Klode 10 年 前
コミット
eee8ee176a
共有1 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 2 2
      apt-pkg/contrib/string_view.h

+ 2 - 2
apt-pkg/contrib/string_view.h

@@ -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);
             return substr(pos).rfind(c);
 
 
         const char *found = static_cast<const char*>(memrchr(data_, c, size_));
         const char *found = static_cast<const char*>(memrchr(data_, c, size_));