Updated bit_cast

This commit is contained in:
John Wellbelove 2022-01-11 17:42:56 +00:00
parent 9bea87dd90
commit cb243f78ca

View File

@ -58,14 +58,7 @@ namespace etl
{
TDestination destination;
const char* s = &source;
char* d = &destination;
char* const de = d + sizeof(TDestination);
while (d != de)
{
*d++ = *s++;
}
memcpy(&destination, &source, sizeof(TDestination));
return destination;
}