diff options
Diffstat (limited to 'src/basic_types.cpp')
-rw-r--r-- | src/basic_types.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/basic_types.cpp b/src/basic_types.cpp index f9a9cc3..67421d9 100644 --- a/src/basic_types.cpp +++ b/src/basic_types.cpp @@ -102,8 +102,9 @@ uint128_t jau::merge_uint128(uint16_t const uuid16, uint128_t const & base_uuid, #else #error "Unexpected __BYTE_ORDER" #endif - uint16_t * destu16 = (uint16_t*)(dest.data + offset); - *destu16 += uuid16; + // uint16_t * destu16 = (uint16_t*)(dest.data + offset); + // *destu16 += uuid16; + reinterpret_cast<packed_t<uint16_t>*>( dest.data + offset )->store += uuid16; return dest; } @@ -137,8 +138,9 @@ uint128_t jau::merge_uint128(uint32_t const uuid32, uint128_t const & base_uuid, #else #error "Unexpected __BYTE_ORDER" #endif - uint32_t * destu32 = (uint32_t*)(dest.data + offset); - *destu32 += uuid32; + // uint32_t * destu32 = (uint32_t*)(dest.data + offset); + // *destu32 += uuid32; + reinterpret_cast<packed_t<uint32_t>*>( dest.data + offset )->store += uuid32; return dest; } |