diff options
author | Julian Andres Klode <jak@debian.org> | 2016-01-08 02:32:23 +0100 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-01-08 02:33:36 +0100 |
commit | 0cc8987abf9f25c458833a0479bc4cb11b405e16 (patch) | |
tree | 6b1deae96a2fb475b2db7f1df6d9d10342e5dce4 /apt-pkg/contrib/string_view.h | |
parent | a0e3c0f55dc20b90f5f7d6d162135c9fef370686 (diff) |
operator==(char*, StringView) use StringView.operator==
Use the same path for both comparisons, as the operator== path
is faster than just calling compare() - it avoids any comparison
if the size differs.
Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg/contrib/string_view.h')
-rw-r--r-- | apt-pkg/contrib/string_view.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h index 37a30a6df..5b6411a33 100644 --- a/apt-pkg/contrib/string_view.h +++ b/apt-pkg/contrib/string_view.h @@ -107,6 +107,6 @@ public: } inline bool operator ==(const char *other, APT::StringView that); -inline bool operator ==(const char *other, APT::StringView that) { return that.compare(other) == 0; } +inline bool operator ==(const char *other, APT::StringView that) { return that.operator==(other); } #endif |