diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-02-05 17:41:39 +0100 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-02-05 19:56:21 +0100 |
commit | d94dcaefa020dcfc89d655dcf5aa8dad998e0bf2 (patch) | |
tree | 38bf667bdcb89d9fa11bc80af39a79381b2480e3 /src/common/new_uuid.cpp | |
parent | hle: ipc_helpers: Ignore -Wclass-memaccess (diff) | |
download | yuzu-d94dcaefa020dcfc89d655dcf5aa8dad998e0bf2.tar yuzu-d94dcaefa020dcfc89d655dcf5aa8dad998e0bf2.tar.gz yuzu-d94dcaefa020dcfc89d655dcf5aa8dad998e0bf2.tar.bz2 yuzu-d94dcaefa020dcfc89d655dcf5aa8dad998e0bf2.tar.lz yuzu-d94dcaefa020dcfc89d655dcf5aa8dad998e0bf2.tar.xz yuzu-d94dcaefa020dcfc89d655dcf5aa8dad998e0bf2.tar.zst yuzu-d94dcaefa020dcfc89d655dcf5aa8dad998e0bf2.zip |
Diffstat (limited to 'src/common/new_uuid.cpp')
-rw-r--r-- | src/common/new_uuid.cpp | 6 |
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; |