mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
utils: fix implementation of SWAP() for complex objects
This commit is contained in:
parent
1316fe0913
commit
91a7e2632d
1 changed files with 4 additions and 5 deletions
|
@ -72,11 +72,10 @@
|
|||
#define ALIGN_MASK(x, m) (((uintptr_t) (x) + (m)) & ~(m))
|
||||
#define IS_ALIGNED(x, a) (ALIGN(x, a) == (uintptr_t) x)
|
||||
|
||||
#define SWAP(x,y) do { \
|
||||
auto &_x = x; \
|
||||
auto &_y = y; \
|
||||
x = _y; \
|
||||
y = _x; \
|
||||
#define SWAP(x, y) do { \
|
||||
auto t = x; \
|
||||
x = y; \
|
||||
y = t; \
|
||||
} while (0)
|
||||
|
||||
/** Round-up integer division */
|
||||
|
|
Loading…
Add table
Reference in a new issue