forked from boostorg/container_hash
Fixed strict aliasing violation.
Changed C-style cast and dereference to std::memcpy. Exactly mirrors other code already in the file.
This commit is contained in:
committed by
Daniel James
parent
549196ca7d
commit
754d5f535e
@@ -68,7 +68,7 @@ namespace boost
|
||||
std::size_t seed = 0;
|
||||
|
||||
if (length >= sizeof(std::size_t)) {
|
||||
seed = *(std::size_t*) ptr;
|
||||
std::memcpy(&seed, ptr, sizeof(std::size_t));
|
||||
length -= sizeof(std::size_t);
|
||||
ptr += sizeof(std::size_t);
|
||||
|
||||
|
Reference in New Issue
Block a user