diff options
author | David Robillard <d@drobilla.net> | 2019-06-25 20:29:02 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-06-27 19:31:28 +0200 |
commit | 4aaad461550dac61795f7950f78062f320cd88ba (patch) | |
tree | cacad7269b59989ecb3fc5801ec00e9659d87a2c | |
parent | bca65c93cd0228d408e0b6029b33da6449a5b567 (diff) | |
download | pugl-4aaad461550dac61795f7950f78062f320cd88ba.tar.gz pugl-4aaad461550dac61795f7950f78062f320cd88ba.tar.bz2 pugl-4aaad461550dac61795f7950f78062f320cd88ba.zip |
Fix const casts
-rw-r--r-- | pugl/pugl_osx.m | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m index 12905d3..01b4d51 100644 --- a/pugl/pugl_osx.m +++ b/pugl/pugl_osx.m @@ -89,7 +89,7 @@ struct PuglInternalsImpl { puglview, 0 }; - puglDispatchEvent(puglview, (PuglEvent*)&ev); + puglDispatchEvent(puglview, (const PuglEvent*)&ev); return YES; } @@ -202,7 +202,7 @@ struct PuglInternalsImpl { } #endif - puglDispatchEvent(puglview, (PuglEvent*)&ev); + puglDispatchEvent(puglview, (const PuglEvent*)&ev); } - (void) drawRect:(NSRect)rect @@ -327,7 +327,7 @@ keySymToSpecial(PuglView* view, NSEvent* ev) 0, 1 }; - puglDispatchEvent(puglview, (PuglEvent*)&ev); + puglDispatchEvent(puglview, (const PuglEvent*)&ev); } - (void) mouseDragged:(NSEvent*)event @@ -361,7 +361,7 @@ keySymToSpecial(PuglView* view, NSEvent* ev) getModifiers(puglview, event), (uint32_t)[event buttonNumber] + 1 }; - puglDispatchEvent(puglview, (PuglEvent*)&ev); + puglDispatchEvent(puglview, (const PuglEvent*)&ev); } - (void) mouseUp:(NSEvent*)event @@ -380,7 +380,7 @@ keySymToSpecial(PuglView* view, NSEvent* ev) getModifiers(puglview, event), (uint32_t)[event buttonNumber] + 1 }; - puglDispatchEvent(puglview, (PuglEvent*)&ev); + puglDispatchEvent(puglview, (const PuglEvent*)&ev); [self updateTrackingAreas]; } @@ -423,7 +423,7 @@ keySymToSpecial(PuglView* view, NSEvent* ev) [event deltaX], [event deltaY] }; - puglDispatchEvent(puglview, (PuglEvent*)&ev); + puglDispatchEvent(puglview, (const PuglEvent*)&ev); [self updateTrackingAreas]; } @@ -455,7 +455,7 @@ keySymToSpecial(PuglView* view, NSEvent* ev) false }; strncpy((char*)ev.utf8, str, 8); - puglDispatchEvent(puglview, (PuglEvent*)&ev); + puglDispatchEvent(puglview, (const PuglEvent*)&ev); } - (void) keyUp:(NSEvent*)event @@ -464,7 +464,7 @@ keySymToSpecial(PuglView* view, NSEvent* ev) const NSPoint rloc = [NSEvent mouseLocation]; const NSString* chars = [event characters]; const char* str = [chars UTF8String]; - const PuglEventKey ev = { + PuglEventKey ev = { PUGL_KEY_RELEASE, puglview, 0, @@ -481,7 +481,7 @@ keySymToSpecial(PuglView* view, NSEvent* ev) false, }; strncpy((char*)ev.utf8, str, 8); - puglDispatchEvent(puglview, (PuglEvent*)&ev); + puglDispatchEvent(puglview, (const PuglEvent*)&ev); } - (void) flagsChanged:(NSEvent*)event @@ -523,7 +523,7 @@ keySymToSpecial(PuglView* view, NSEvent* ev) { 0, 0, 0, 0, 0, 0, 0, 0 }, false }; - puglDispatchEvent(puglview, (PuglEvent*)&ev); + puglDispatchEvent(puglview, (const PuglEvent*)&ev); } puglview->impl->mods = mods; |