diff --git a/include/etl/bit.h b/include/etl/bit.h index 844456d0..b8e57f06 100644 --- a/include/etl/bit.h +++ b/include/etl/bit.h @@ -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; }