Skip to content

Commit

Permalink
fixing OZZ_BYTE_SWAP for g++ 11
Browse files Browse the repository at this point in the history
  • Loading branch information
ugocupcic authored Jul 22, 2022
1 parent 7fd3642 commit 6d03827
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions include/ozz/base/endianness.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ template <typename _Ty, size_t _size = sizeof(_Ty)>
struct EndianSwapper;

// Internal macro used to swap two bytes.
#define OZZ_BYTE_SWAP(_a, _b) \
do { \
const ozz::byte temp = (_a); \
(_a) = (_b); \
(_b) = temp; \
} while (0)
#define OZZ_BYTE_SWAP(a, b) {a = a ^ b; b = a ^ b; a = a ^ b;}

// EndianSwapper specialization for 1 byte types.
template <typename _Ty>
Expand Down

0 comments on commit 6d03827

Please sign in to comment.