summaryrefslogtreecommitdiffstats
path: root/src/common/new_uuid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/new_uuid.cpp')
-rw-r--r--src/common/new_uuid.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/new_uuid.cpp b/src/common/new_uuid.cpp
index 0442681c8..f2f0077ae 100644
--- a/src/common/new_uuid.cpp
+++ b/src/common/new_uuid.cpp
@@ -144,6 +144,12 @@ size_t NewUUID::Hash() const noexcept {
return hash ^ std::rotl(temp, 1);
}
+u128 NewUUID::AsU128() const {
+ u128 uuid_old;
+ std::memcpy(&uuid_old, uuid.data(), sizeof(NewUUID));
+ return uuid_old;
+}
+
NewUUID NewUUID::MakeRandom() {
std::random_device device;