summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/string_view.h
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-12-26 13:07:23 -1000
committerSam Bingner <sam@bingner.com>2018-12-26 14:51:59 -1000
commit59c3e0b998fd69532159d8dc416109cf50651482 (patch)
tree2e58bef1273e4d3542c168980e4a2d793e170045 /apt-pkg/contrib/string_view.h
parentac0d26d4e39da16bdbf575637fd3d4b24a7fb4b8 (diff)
parent2aa218273eb6009880e987f90d3e24b8efb04642 (diff)
Merge nitotv apt fixes into 1.4.81.4.8+nitotv
Diffstat (limited to 'apt-pkg/contrib/string_view.h')
-rw-r--r--apt-pkg/contrib/string_view.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h
index c504edd27..52ad71d5c 100644
--- a/apt-pkg/contrib/string_view.h
+++ b/apt-pkg/contrib/string_view.h
@@ -14,6 +14,7 @@
#include <string.h>
#include <string>
#include <apt-pkg/macros.h>
+#include <apt-pkg/missing.h>
namespace APT {
@@ -112,18 +113,6 @@ public:
constexpr size_t length() const { return size_; }
};
-/**
- * \brief Faster comparison for string views (compare size before data)
- *
- * Still stable, but faster than the normal ordering. */
-static inline int StringViewCompareFast(StringView a, StringView b) {
- if (a.size() != b.size())
- return a.size() - b.size();
-
- return memcmp(a.data(), b.data(), a.size());
-}
-
-
}
inline bool operator ==(const char *other, APT::StringView that);