mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 05:36:35 +00:00
Use __typeof__() instead of void*
Preserve the real type of a pointer instead of casting to `void*`. Closes #1703.
This commit is contained in:
parent
d4f5074535
commit
63c96643b2
@ -218,7 +218,7 @@ typedef void (APIENTRY * PFN_vkVoidFunction)(void);
|
|||||||
// Swaps the provided pointers
|
// Swaps the provided pointers
|
||||||
#define _GLFW_SWAP_POINTERS(x, y) \
|
#define _GLFW_SWAP_POINTERS(x, y) \
|
||||||
{ \
|
{ \
|
||||||
void* t; \
|
__typeof__(x) t; \
|
||||||
t = x; \
|
t = x; \
|
||||||
x = y; \
|
x = y; \
|
||||||
y = t; \
|
y = t; \
|
||||||
|
Loading…
Reference in New Issue
Block a user