Mercurial > hg > dmlib
diff src/dmlib.h @ 2486:6d12670e0248
Rename DM_SWAP() macro to DM_SWAP_IF().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 28 Apr 2020 14:45:44 +0300 |
parents | 3b28868475e8 |
children | fcaf2db0cd05 |
line wrap: on
line diff
--- a/src/dmlib.h Tue Apr 28 14:16:50 2020 +0300 +++ b/src/dmlib.h Tue Apr 28 14:45:44 2020 +0300 @@ -273,7 +273,8 @@ // Macro for swapping two lvalues of same type -#define DM_SWAP(T, A, B) { if ((B) < (A)) { T swtmp = (B); B = (A); A = swtmp; } } +#define DM_SWAP(T, A, B) { T swtmp = (B); B = (A); A = swtmp; } +#define DM_SWAP_IF(T, A, B) { if ((B) < (A)) { T swtmp = (B); B = (A); A = swtmp; } } /* Drawing modes used by blitting and some other functions.