Procházet zdrojové kódy

StringView::rfind(): Call rfind() instead of find() on subst

Thanks: Niels Thykier for reporting on IRC
Gbp-Dch: ignore
Julian Andres Klode před 10 roky
rodič
revize
8cfd5495e3
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      apt-pkg/contrib/string_view.h

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

@@ -57,7 +57,7 @@ public:
 
     size_t rfind(int c, size_t pos=0) const {
         if (pos != 0)
-            return substr(pos).find(c);
+            return substr(pos).rfind(c);
 
         const char *found = static_cast<const char*>(memrchr(data_, c, size_));