summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-12-27 20:54:44 -0500
committerGravatar Zach Hilman2019-04-25 08:07:57 -0400
commit1aa2b99a982e83022c9aae23c6a47eae119d21a4 (patch)
tree33f5c35625557c73998d48ca8f0d26dd0f986d84 /src/common
parentmii: Implement IsUpdated command (IPC 0) (diff)
downloadyuzu-1aa2b99a982e83022c9aae23c6a47eae119d21a4.tar.gz
yuzu-1aa2b99a982e83022c9aae23c6a47eae119d21a4.tar.xz
yuzu-1aa2b99a982e83022c9aae23c6a47eae119d21a4.zip
mii: Implement Delete and Destroy file
Diffstat (limited to 'src/common')
-rw-r--r--src/common/uuid.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/common/uuid.h b/src/common/uuid.h
index b8864b34f..f6ad064fb 100644
--- a/src/common/uuid.h
+++ b/src/common/uuid.h
@@ -19,15 +19,16 @@ struct UUID {
19 constexpr explicit UUID(const u128& id) : uuid{id} {} 19 constexpr explicit UUID(const u128& id) : uuid{id} {}
20 constexpr explicit UUID(const u64 lo, const u64 hi) : uuid{{lo, hi}} {} 20 constexpr explicit UUID(const u64 lo, const u64 hi) : uuid{{lo, hi}} {}
21 21
22 explicit operator bool() const { 22 constexpr explicit operator bool() const {
23 return uuid != INVALID_UUID; 23 return uuid[0] != INVALID_UUID[0] && uuid[1] != INVALID_UUID[1];
24 } 24 }
25 25
26 bool operator==(const UUID& rhs) const { 26 constexpr bool operator==(const UUID& rhs) const {
27 return uuid == rhs.uuid; 27 // TODO(DarkLordZach): Replace with uuid == rhs.uuid with C++20
28 return uuid[0] == rhs.uuid[0] && uuid[1] == rhs.uuid[1];
28 } 29 }
29 30
30 bool operator!=(const UUID& rhs) const { 31 constexpr bool operator!=(const UUID& rhs) const {
31 return !operator==(rhs); 32 return !operator==(rhs);
32 } 33 }
33 34