summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-01-07 20:21:16 +0100
committerJulian Andres Klode <jak@debian.org>2016-01-07 20:21:16 +0100
commiteee8ee176a5ae3377cc601eb68cdb576b8076761 (patch)
tree944916a4bacdfdcacf4fff9f3770063fed01eab5 /apt-pkg
parent8cfd5495e30533e2ab708c8dc875f1c6f29650fd (diff)
StringView: pos argument default should be npos
Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/string_view.h4
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_));