From b2fa9805eb63d5daa1dd8fab1edf0c85fb7ebfc0 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Fri, 8 Jan 2010 04:36:12 +0000 Subject: [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) --- AppKit/GTMCarbonEvent.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'AppKit/GTMCarbonEvent.m') 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 -- cgit v1.2.3