diff options
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/string_view.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h index 16f324597..3585da45a 100644 --- a/apt-pkg/contrib/string_view.h +++ b/apt-pkg/contrib/string_view.h @@ -55,8 +55,8 @@ public: 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_)); |