...
Code Block | ||
---|---|---|
| ||
/* Swaps two values, requires tmp variable to be defined */ #define SWAP(x, y) \ do { \ tmp = x; \ x = y; \ y = tmp; } \ } while (0) |
The do-while loop will always be executed exactly once.
...
...
Code Block | ||
---|---|---|
| ||
/* Swaps two values, requires tmp variable to be defined */ #define SWAP(x, y) \ do { \ tmp = x; \ x = y; \ y = tmp; } \ } while (0) |
The do-while loop will always be executed exactly once.
...