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

Unified Diff: mojo/edk/system/ports/name.h

Issue 1675603002: [mojo-edk] Simplify multiprocess pipe bootstrap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: mojo/edk/system/ports/name.h
diff --git a/mojo/edk/system/ports/name.h b/mojo/edk/system/ports/name.h
index b0ad0b71c825eff67b4d5c290f5a3d41eb73f209..62eab3a1b837cea4e4895fecf98d0a2a5682d26b 100644
--- a/mojo/edk/system/ports/name.h
+++ b/mojo/edk/system/ports/name.h
@@ -21,9 +21,15 @@ struct Name {
inline bool operator==(const Name& a, const Name& b) {
return a.v1 == b.v1 && a.v2 == b.v2;
}
+
inline bool operator!=(const Name& a, const Name& b) {
return !(a == b);
}
+
+inline bool operator<(const Name& a, const Name& b) {
+ return a.v1 < b.v1 || (a.v1 == b.v1 && a.v2 < b.v2);
Anand Mistry (off Chromium) 2016/02/08 06:23:21 Use std::tie
Ken Rockot(use gerrit already) 2016/02/08 23:20:56 done
+}
+
std::ostream& operator<<(std::ostream& stream, const Name& name);
struct PortName : Name {

Powered by Google App Engine
This is Rietveld 408576698