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:
Andy Webber
2014-12-18 17:27:59 -05:00
committed by Daniel James
parent 770e4dea08
commit d5dc5033d2

View File

@@ -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);