Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: webrtc/p2p/base/turnserver.cc

Issue 2187913002: Fixing invalid operator< implementation. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/p2p/base/turnserver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnserver.cc
diff --git a/webrtc/p2p/base/turnserver.cc b/webrtc/p2p/base/turnserver.cc
index dac7e38184247aba998e3093475f7cd39f1150a4..7dd9e19f63d0f9abd5268218d3210d84f01ab33b 100644
--- a/webrtc/p2p/base/turnserver.cc
+++ b/webrtc/p2p/base/turnserver.cc
@@ -10,6 +10,8 @@
#include "webrtc/p2p/base/turnserver.h"
+#include <tuple> // for std::tie
+
#include "webrtc/p2p/base/asyncstuntcpsocket.h"
#include "webrtc/p2p/base/common.h"
#include "webrtc/p2p/base/packetsocketfactory.h"
@@ -544,7 +546,7 @@ bool TurnServerConnection::operator==(const TurnServerConnection& c) const {
}
bool TurnServerConnection::operator<(const TurnServerConnection& c) const {
- return src_ < c.src_ || dst_ < c.dst_ || proto_ < c.proto_;
+ return std::tie(src_, dst_, proto_) < std::tie(c.src_, c.dst_, c.proto_);
}
std::string TurnServerConnection::ToString() const {
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/p2p/base/turnserver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698