util: make SWAP safe for MSVC

Jesse acked on irc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36147>
This commit is contained in:
Alyssa Rosenzweig 2025-07-22 15:42:50 -04:00 committed by Marge Bot
parent 92213f647e
commit 59ffaf9222

View file

@ -524,7 +524,7 @@ typedef int lock_cap_t;
*/
#define SWAP(a, b) \
do { \
__typeof(a) __tmp = (a); \
__typeof__(a) __tmp = (a); \
(a) = (b); \
(b) = __tmp; \
} while (0)