summaryrefslogtreecommitdiff
path: root/src/common/uuid.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/uuid.h')
-rw-r--r--src/common/uuid.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/common/uuid.h b/src/common/uuid.h
index 7172ca165..81bfefbbb 100644
--- a/src/common/uuid.h
+++ b/src/common/uuid.h
@@ -12,9 +12,8 @@
12namespace Common { 12namespace Common {
13 13
14struct UUID { 14struct UUID {
15 std::array<u8, 0x10> uuid{}; 15 std::array<u8, 0x10> uuid;
16 16
17 /// Constructs an invalid UUID.
18 constexpr UUID() = default; 17 constexpr UUID() = default;
19 18
20 /// Constructs a UUID from a reference to a 128 bit array. 19 /// Constructs a UUID from a reference to a 128 bit array.
@@ -34,14 +33,6 @@ struct UUID {
34 */ 33 */
35 explicit UUID(std::string_view uuid_string); 34 explicit UUID(std::string_view uuid_string);
36 35
37 ~UUID() = default;
38
39 constexpr UUID(const UUID&) noexcept = default;
40 constexpr UUID(UUID&&) noexcept = default;
41
42 constexpr UUID& operator=(const UUID&) noexcept = default;
43 constexpr UUID& operator=(UUID&&) noexcept = default;
44
45 /** 36 /**
46 * Returns whether the stored UUID is valid or not. 37 * Returns whether the stored UUID is valid or not.
47 * 38 *
@@ -121,6 +112,7 @@ struct UUID {
121 friend constexpr bool operator==(const UUID& lhs, const UUID& rhs) = default; 112 friend constexpr bool operator==(const UUID& lhs, const UUID& rhs) = default;
122}; 113};
123static_assert(sizeof(UUID) == 0x10, "UUID has incorrect size."); 114static_assert(sizeof(UUID) == 0x10, "UUID has incorrect size.");
115static_assert(std::is_trivial_v<UUID>);
124 116
125/// An invalid UUID. This UUID has all its bytes set to 0. 117/// An invalid UUID. This UUID has all its bytes set to 0.
126constexpr UUID InvalidUUID = {}; 118constexpr UUID InvalidUUID = {};