From: Julian Andres Klode Date: Thu, 7 Jan 2016 19:21:16 +0000 (+0100) Subject: StringView: pos argument default should be npos X-Git-Tag: 1.2_exp1~28 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/eee8ee176a5ae3377cc601eb68cdb576b8076761 StringView: pos argument default should be npos Gbp-Dch: ignore --- 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_));