Properly include headers for memcpy
This commit is contained in:
parent
2dbfbe70af
commit
b47736b595
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user