From eee8ee176a5ae3377cc601eb68cdb576b8076761 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 7 Jan 2016 20:21:16 +0100 Subject: StringView: pos argument default should be npos Gbp-Dch: ignore --- apt-pkg/contrib/string_view.h | 4 ++-- 1 file 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(memrchr(data_, c, size_)); -- cgit v1.2.3