[C++11] Use std::tie to simplify compare operators.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer
2014-03-03 19:58:30 +00:00
parent c3835ccef9
commit 9efaf2f2da
8 changed files with 22 additions and 54 deletions
+1 -2
View File
@@ -135,8 +135,7 @@ public:
}
bool operator!=(const UniqueID &Other) const { return !(*this == Other); }
bool operator<(const UniqueID &Other) const {
return Device < Other.Device ||
(Device == Other.Device && File < Other.File);
return std::tie(Device, File) < std::tie(Other.Device, Other.File);
}
uint64_t getDevice() const { return Device; }
uint64_t getFile() const { return File; }