diff options
Diffstat (limited to 'src/cpp/util/string_ref.cc')
-rw-r--r-- | src/cpp/util/string_ref.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc index c42033f61f..604134fa9d 100644 --- a/src/cpp/util/string_ref.cc +++ b/src/cpp/util/string_ref.cc @@ -85,29 +85,17 @@ size_t string_ref::find(char c) const { return it == cend() ? npos : std::distance(cbegin(), it); } -bool operator==(string_ref x, string_ref y) { - return x.compare(y) == 0; -} +bool operator==(string_ref x, string_ref y) { return x.compare(y) == 0; } -bool operator!=(string_ref x, string_ref y) { - return x.compare(y) != 0; -} +bool operator!=(string_ref x, string_ref y) { return x.compare(y) != 0; } -bool operator<(string_ref x, string_ref y) { - return x.compare(y) < 0; -} +bool operator<(string_ref x, string_ref y) { return x.compare(y) < 0; } -bool operator<=(string_ref x, string_ref y) { - return x.compare(y) <= 0; -} +bool operator<=(string_ref x, string_ref y) { return x.compare(y) <= 0; } -bool operator>(string_ref x, string_ref y) { - return x.compare(y) > 0; -} +bool operator>(string_ref x, string_ref y) { return x.compare(y) > 0; } -bool operator>=(string_ref x, string_ref y) { - return x.compare(y) >= 0; -} +bool operator>=(string_ref x, string_ref y) { return x.compare(y) >= 0; } std::ostream& operator<<(std::ostream& out, const string_ref& string) { return out << grpc::string(string.begin(), string.end()); |