aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMCarbonEvent.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-01-08 04:36:12 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-01-08 04:36:12 +0000
commitb2fa9805eb63d5daa1dd8fab1edf0c85fb7ebfc0 (patch)
treea07aae86ed120807b8f2d5f621e575f4257115c8 /AppKit/GTMCarbonEvent.m
parent31ce8143b3739153e88bd6847e1fbaf7633f6233 (diff)
[Author: dmaclach]
Added some basic casting debugging goodness to GTM. Opinions? added to help catch a bug in QSB. R=thomasvl DELTA=55 (55 added, 0 deleted, 0 changed)
Diffstat (limited to 'AppKit/GTMCarbonEvent.m')
-rw-r--r--AppKit/GTMCarbonEvent.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/AppKit/GTMCarbonEvent.m b/AppKit/GTMCarbonEvent.m
index 16c46c8..2166331 100644
--- a/AppKit/GTMCarbonEvent.m
+++ b/AppKit/GTMCarbonEvent.m
@@ -19,6 +19,7 @@
#import "GTMCarbonEvent.h"
#import "GTMObjectSingleton.h"
#import "GTMDebugSelectorValidation.h"
+#import "GTMTypeCasting.h"
// Wrapper for all the info we need about a hotkey that we can store in a
// Foundation storage class. We expecct selector to have this signature:
@@ -432,8 +433,8 @@ static OSStatus EventHandler(EventHandlerCallRef inHandler,
EventRef inEvent,
void *inUserData) {
GTMCarbonEvent *event = [GTMCarbonEvent eventWithEvent:inEvent];
- GTMCarbonEventHandler *handler= (GTMCarbonEventHandler *)inUserData;
- check([handler isKindOfClass:[GTMCarbonEventHandler class]]);
+ GTMCarbonEventHandler *handler
+ = GTM_STATIC_CAST(GTMCarbonEventHandler, inUserData);
// First check to see if our delegate cares about this event. If the delegate
// handles it (i.e responds to it and does not return eventNotHandledErr) we