1
0
mirror of synced 2025-01-30 03:27:25 +01:00

Properly include headers for memcpy

This commit is contained in:
WerWolv 2021-01-07 01:58:56 +01:00
parent 2dbfbe70af
commit b47736b595

View File

@ -3,6 +3,7 @@
#include <hex.hpp> #include <hex.hpp>
#include <array> #include <array>
#include <cstring>
#include <functional> #include <functional>
#include <memory> #include <memory>
#include <optional> #include <optional>
@ -137,7 +138,7 @@ namespace hex {
return __builtin_bswap64(value); return __builtin_bswap64(value);
else if (size == 16) { else if (size == 16) {
u64 parts[2]; u64 parts[2];
memcpy(parts, &value, size); std::memcpy(parts, &value, size);
return u128(parts[1]) << 64 | u128(parts[0]); return u128(parts[1]) << 64 | u128(parts[0]);
} }
else else