summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Utility/UUID.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lldb/source/Utility/UUID.cpp b/lldb/source/Utility/UUID.cpp
index b47f8b52f1c..edad98e2f20 100644
--- a/lldb/source/Utility/UUID.cpp
+++ b/lldb/source/Utility/UUID.cpp
@@ -198,8 +198,7 @@ bool lldb_private::operator==(const lldb_private::UUID &lhs,
bool lldb_private::operator!=(const lldb_private::UUID &lhs,
const lldb_private::UUID &rhs) {
- return ::memcmp(lhs.GetBytes(), rhs.GetBytes(),
- sizeof(lldb_private::UUID::ValueType)) != 0;
+ return !(lhs == rhs);
}
bool lldb_private::operator<(const lldb_private::UUID &lhs,
@@ -210,18 +209,15 @@ bool lldb_private::operator<(const lldb_private::UUID &lhs,
bool lldb_private::operator<=(const lldb_private::UUID &lhs,
const lldb_private::UUID &rhs) {
- return ::memcmp(lhs.GetBytes(), rhs.GetBytes(),
- sizeof(lldb_private::UUID::ValueType)) <= 0;
+ return !(lhs > rhs);
}
bool lldb_private::operator>(const lldb_private::UUID &lhs,
const lldb_private::UUID &rhs) {
- return ::memcmp(lhs.GetBytes(), rhs.GetBytes(),
- sizeof(lldb_private::UUID::ValueType)) > 0;
+ return rhs < lhs;
}
bool lldb_private::operator>=(const lldb_private::UUID &lhs,
const lldb_private::UUID &rhs) {
- return ::memcmp(lhs.GetBytes(), rhs.GetBytes(),
- sizeof(lldb_private::UUID::ValueType)) >= 0;
+ return !(lhs < rhs);
}
OpenPOWER on IntegriCloud