diff --git a/src/macos.mm b/src/macos.mm index 400a6f5..4761dba 100644 --- a/src/macos.mm +++ b/src/macos.mm @@ -39,7 +39,7 @@ inline bool keyDown(PlatformKey key, NSEvent* event) #define HOOK_OBJC_METHOD(klass, type, cleanFuncName, funcName) \ auto cleanFuncName ## Method = class_getInstanceMethod(klass, @selector(funcName)); \ cleanFuncName ## OIMP = reinterpret_cast(method_getImplementation(cleanFuncName ## Method)); \ - method_setImplementation(cleanFuncName ## Method, (type)&cleanFuncName); + method_setImplementation(cleanFuncName ## Method, reinterpret_cast(&cleanFuncName)); using KeyEventType = void(*)(EAGLView*, SEL, NSEvent*);