Use __typeof__() instead of void*

Preserve the real type of a pointer instead of casting to `void*`.

Closes #1703.
This commit is contained in:
Luflosi 2020-05-25 18:27:50 +02:00
parent d4f5074535
commit 63c96643b2
No known key found for this signature in database
GPG Key ID: 4E41E29EDCC345D0

View File

@ -218,7 +218,7 @@ typedef void (APIENTRY * PFN_vkVoidFunction)(void);
// Swaps the provided pointers
#define _GLFW_SWAP_POINTERS(x, y) \
{ \
void* t; \
__typeof__(x) t; \
t = x; \
x = y; \
y = t; \