We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 14511e9 + 8d8ae3e commit ae076acCopy full SHA for ae076ac
include/network/string_view.hpp
@@ -161,9 +161,8 @@ class basic_string_view {
161
}
162
163
constexpr int compare(basic_string_view s) const noexcept {
164
- if (size() != s.size())
165
- return size() < s.size() ? -1 : 1;
166
- return traits::compare(data(), s.data(), size());
+ return (size() != s.size()) ? (size() < s.size()) ? -1 : 1
+ : traits::compare(data(), s.data(), size());
167
168
169
constexpr int compare(size_type pos1, size_type n1,
0 commit comments