diff options
author | Arnaud VERSINI <arnaud.versini@libreoffice.org> | 2022-08-13 14:42:19 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-09-27 10:59:22 +0200 |
commit | 49279212597db3993e1f8f1f70be873a2e22fe2f (patch) | |
tree | 75b767bdc9a56081ecea6245aa4fb2d15bb80474 /sal | |
parent | 8623ce7cc634574f3f1294bc855ecd8dd32d661a (diff) |
rtl uuid : remove useless endian conversion
Change-Id: I65a4dad0aceb83f2449c86c438cb478937c8b90a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138229
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/uuid.cxx | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/sal/rtl/uuid.cxx b/sal/rtl/uuid.cxx index 5d348cb8f8e7..22e7f0fe0416 100644 --- a/sal/rtl/uuid.cxx +++ b/sal/rtl/uuid.cxx @@ -25,14 +25,6 @@ #include <rtl/uuid.h> #include <rtl/digest.h> -#define SWAP_INT32_TO_NETWORK(x)\ - { sal_uInt32 y = x;\ - sal_uInt8 *p = reinterpret_cast<sal_uInt8 *>(&(x)); \ - p[0] = static_cast<sal_uInt8>( ( y >> 24 ) & 0xff );\ - p[1] = static_cast<sal_uInt8>( ( y >> 16 ) & 0xff );\ - p[2] = static_cast<sal_uInt8>( ( y >> 8 ) & 0xff );\ - p[3] = static_cast<sal_uInt8>( ( y ) & 0xff);\ - } #define SWAP_INT16_TO_NETWORK(x)\ { sal_uInt16 y = x;\ sal_uInt8 *p = reinterpret_cast<sal_uInt8 *>(&(x)); \ @@ -75,8 +67,6 @@ static void write_v3( sal_uInt8 *pUuid ) // copy to avoid alignment problems memcpy(&uuid, pUuid, 16); - SWAP_NETWORK_TO_INT32(uuid.time_low); - SWAP_NETWORK_TO_INT16(uuid.time_mid); SWAP_NETWORK_TO_INT16(uuid.time_hi_and_version); /* put in the variant and version bits */ @@ -85,8 +75,6 @@ static void write_v3( sal_uInt8 *pUuid ) uuid.clock_seq_hi_and_reserved &= 0x3F; uuid.clock_seq_hi_and_reserved |= 0x80; - SWAP_INT32_TO_NETWORK(uuid.time_low); - SWAP_INT16_TO_NETWORK(uuid.time_mid); SWAP_INT16_TO_NETWORK(uuid.time_hi_and_version); memcpy(pUuid, &uuid, 16); |