diff options
| author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2024-11-14 17:36:43 +0100 |
|---|---|---|
| committer | наб <nabijaczleweli@nabijaczleweli.xyz> | 2024-11-14 18:17:10 +0100 |
| commit | 5250c229315dab9a6dbf68385dae88f561b0fbe1 (patch) | |
| tree | 7eb7e7b11d9d03d121441f1c716b255389a50946 /apt-pkg/contrib/string_view.h | |
| parent | 4a404fc7e59d845d04b4e8f9cd39d7aea74fc423 (diff) | |
Move StringViewCompareFast to strutil.h
Diffstat (limited to 'apt-pkg/contrib/string_view.h')
| -rw-r--r-- | apt-pkg/contrib/string_view.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h index b062517b6..34a8e8a95 100644 --- a/apt-pkg/contrib/string_view.h +++ b/apt-pkg/contrib/string_view.h @@ -146,17 +146,6 @@ inline std::ostream& operator<<(std::ostream& os, const StringView& sv) return os << static_cast<std::string_view>(sv); } -/** - * \brief Faster comparison for string views (compare size before data) - * - * Still stable, but faster than the normal ordering. */ -static inline int StringViewCompareFast(const std::string_view & a, const std::string_view & b) { - if (a.size() != b.size()) - return a.size() - b.size(); - - return a.compare(b); -} - static constexpr inline APT::StringView operator""_sv(const char *data, size_t size) { return APT::StringView(data, size); |
