Re: immutable collection given to mutating function error
Re: immutable collection given to mutating function error
- Subject: Re: immutable collection given to mutating function error
- From: Charles Srstka <email@hidden>
- Date: Sun, 22 Feb 2009 18:55:13 -0600
Replace this line:
On Feb 22, 2009, at 11:17 AM, Michael Domino wrote:
prefMinorSectionCFMutableDictionaryRef =
static_cast<CFMutableDictionaryRef>(const_cast<void*>(pVoid));
with this:
prefMinorSectionCFMutableDictionaryRef =
CFDictionaryCreateMutableCopy(NULL, 0,
static_cast<CFDictionaryRef>(const_cast<void*>(pVoid)));
This way, you'll be sure to always get a mutable dictionary,
regardless of whether the original was mutable or not.
Charles
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden