Index: webrtc/p2p/base/turnserver.cc |
diff --git a/webrtc/p2p/base/turnserver.cc b/webrtc/p2p/base/turnserver.cc |
index dac7e38184247aba998e3093475f7cd39f1150a4..4464c761ee2d5f1f780aa6b49adbdfc3bb9b706e 100644 |
--- a/webrtc/p2p/base/turnserver.cc |
+++ b/webrtc/p2p/base/turnserver.cc |
@@ -544,7 +544,19 @@ bool TurnServerConnection::operator==(const TurnServerConnection& c) const { |
} |
bool TurnServerConnection::operator<(const TurnServerConnection& c) const { |
- return src_ < c.src_ || dst_ < c.dst_ || proto_ < c.proto_; |
+ if (src_ != c.src_) { |
honghaiz3
2016/07/27 18:38:13
Probably this is a good place to use std::tie sinc
Taylor Brandstetter
2016/07/28 22:42:08
Good point! I didn't know about that. Done.
|
+ return src_ < c.src_; |
honghaiz3
2016/07/27 18:38:13
Plus, could we add a test to make sure the operato
Taylor Brandstetter
2016/07/28 22:42:08
Done. It's hard to cover every possibility of oper
|
+ } |
+ |
+ if (dst_ != c.dst_) { |
+ return dst_ < c.dst_; |
+ } |
+ |
+ if (proto_ != c.proto_) { |
+ return proto_ < c.proto_; |
+ } |
+ |
+ return false; |
} |
std::string TurnServerConnection::ToString() const { |