Merge pull request #1491 from DennisOSRM/patch-1

Fix compiler warning emitted from GCC8
This commit is contained in:
John Kessenich 2018-09-12 09:02:08 -06:00 committed by GitHub
commit f658c3033b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ Dest BitwiseCast(Src source) {
Dest dest; Dest dest;
static_assert(sizeof(source) == sizeof(dest), static_assert(sizeof(source) == sizeof(dest),
"BitwiseCast: Source and destination must have the same size"); "BitwiseCast: Source and destination must have the same size");
std::memcpy(&dest, &source, sizeof(dest)); std::memcpy(static_cast<void*>(&dest), &source, sizeof(dest));
return dest; return dest;
} }