diff --git a/src/util/StringCompare.hxx b/src/util/StringCompare.hxx index 579752187..e64cedb9b 100644 --- a/src/util/StringCompare.hxx +++ b/src/util/StringCompare.hxx @@ -22,8 +22,7 @@ StringIsEmpty(const char *string) noexcept static inline bool StringIsEqual(std::string_view a, std::string_view b) noexcept { - return a.size() == b.size() && - StringIsEqual(a.data(), b.data(), b.size()); + return a == b; } [[gnu::pure]] diff --git a/src/util/WStringCompare.hxx b/src/util/WStringCompare.hxx index 91fd84f5b..390e1cdcc 100644 --- a/src/util/WStringCompare.hxx +++ b/src/util/WStringCompare.hxx @@ -21,8 +21,7 @@ StringIsEmpty(const wchar_t *string) noexcept static inline bool StringIsEqual(std::wstring_view a, std::wstring_view b) noexcept { - return a.size() == b.size() && - StringIsEqual(a.data(), b.data(), b.size()); + return a == b; } [[gnu::pure]]