Fix gcc warning in bit_cast
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@ namespace std
|
|||||||
{
|
{
|
||||||
static_assert(sizeof(To) == sizeof(From), "std::bit_cast<>: incompatible type size");
|
static_assert(sizeof(To) == sizeof(From), "std::bit_cast<>: incompatible type size");
|
||||||
|
|
||||||
To result;
|
To result{};
|
||||||
std::memcpy(&result, &from, sizeof(From));
|
std::memcpy(&result, &from, sizeof(From));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user