summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Morph2021-07-20 13:44:48 -0400
committerGravatar GitHub2021-07-20 13:44:48 -0400
commit8616c0f8f3a9bd828128d0f0664dac8d5c5dd3eb (patch)
tree82c6645ae73a667245b7f2444b46fd3197b55b3c
parentvk_buffer_cache: Fix quad index array with 0 vertices (#6627) (diff)
parentuuid: Directly compare UUID instead of checking per element (diff)
downloadyuzu-8616c0f8f3a9bd828128d0f0664dac8d5c5dd3eb.tar.gz
yuzu-8616c0f8f3a9bd828128d0f0664dac8d5c5dd3eb.tar.xz
yuzu-8616c0f8f3a9bd828128d0f0664dac8d5c5dd3eb.zip
Merge pull request #6684 from ogniK5377/uuid-cpp20-new
uuid: Directly compare UUID instead of checking per element
Diffstat (limited to '')
-rw-r--r--src/common/uuid.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/uuid.h b/src/common/uuid.h
index 2e7a18405..0ffa37e7c 100644
--- a/src/common/uuid.h
+++ b/src/common/uuid.h
@@ -20,12 +20,11 @@ struct UUID {
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 [[nodiscard]] constexpr explicit operator bool() const { 22 [[nodiscard]] constexpr explicit operator bool() const {
23 return uuid[0] != INVALID_UUID[0] && uuid[1] != INVALID_UUID[1]; 23 return uuid != INVALID_UUID;
24 } 24 }
25 25
26 [[nodiscard]] constexpr bool operator==(const UUID& rhs) const { 26 [[nodiscard]] constexpr bool operator==(const UUID& rhs) const {
27 // TODO(DarkLordZach): Replace with uuid == rhs.uuid with C++20 27 return uuid == rhs.uuid;
28 return uuid[0] == rhs.uuid[0] && uuid[1] == rhs.uuid[1];
29 } 28 }
30 29
31 [[nodiscard]] constexpr bool operator!=(const UUID& rhs) const { 30 [[nodiscard]] constexpr bool operator!=(const UUID& rhs) const {