summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeVerifier.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-28 15:37:09 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-10-07 15:34:56 -0700
commit7c96762f5f4cf5d9952fbf4093a4173f0ced989a (patch)
tree7d45852fd21b90495a98af8efdf70f599992c874 /Source/Core/DiscIO/VolumeVerifier.cpp
parent2b22e6ffc9619dacf6854aec81e5a0e39ca0c08e (diff)
Simplify `std::copy` with `std::copy_n`
+ a surprise `std::memcpy` in VolumeVerifier.cpp.
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp
index 5a4a9c6856..5cb9fa3e59 100644
--- a/Source/Core/DiscIO/VolumeVerifier.cpp
+++ b/Source/Core/DiscIO/VolumeVerifier.cpp
@@ -1301,8 +1301,7 @@ void VolumeVerifier::Finish()
{
m_result.hashes.crc32 = std::vector<u8>(4);
const u32 crc32_be = Common::swap32(m_crc32_context);
- const u8* crc32_be_ptr = reinterpret_cast<const u8*>(&crc32_be);
- std::copy(crc32_be_ptr, crc32_be_ptr + 4, m_result.hashes.crc32.begin());
+ std::memcpy(m_result.hashes.crc32.data(), &crc32_be, 4);
}
if (m_hashes_to_calculate.md5)