Re: More NSDictionary to CFDictionary
Re: More NSDictionary to CFDictionary
- Subject: Re: More NSDictionary to CFDictionary
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 16 Nov 2006 14:47:30 -0800
On 11/16/06, Kevin Bracey <email@hidden> wrote:
Hi there,
Wow zillions times faster...
I guess this works fine because of Toll Free stuff but I now get a
warning. How do I fix self? I normally just stick to Cocoa so I don't
have to deal with these issues:-)
@implementation NSDictionary ( UWDictionaryAdditions )
-( BOOL )hasKey:( id )aKey;
{
return CFDictionaryContainsKey( self, aKey);
}
UWDictionaryAdditions.m:16: warning: passing argument 1 of
'CFDictionaryContainsKey' from incompatible pointer type
CFDictionaryContainsKey((CFDictionaryRef)self, aKey);
...but personally I would stick to the Cocoa side of the fence and do
the following unless you really find a performance issue...
return [[self objectForKey:aKey] != nil];
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden