• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange problem with CFHash and CFEqual
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange problem with CFHash and CFEqual


  • Subject: Re: Strange problem with CFHash and CFEqual
  • From: David Duncan <email@hidden>
  • Date: Thu, 18 Jun 2009 11:53:10 -0700

On Jun 18, 2009, at 11:39 AM, Stefan wrote:

I have 2 CGImageRef 'objects' which i have to compare.
That is working fine with the CFEqual function.
But i also need a valid (valid per contract) HashCode too.

The problem is now that these hashcodes are _always_ 0


A 0 hash code is valid (if somewhat useless). It just puts them all in the same bucket. If you want a better hash code, then you would have to implement that yourself (I would probably do something with the width, height, rowbytes and maybe some other parameters of the image.
--
David Duncan
Apple DTS Animation and Printing


_______________________________________________

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


References: 
 >Strange problem with CFHash and CFEqual (From: Stefan <email@hidden>)

  • Prev by Date: Re: MDSchemaCopyAllAttributes() returning nil
  • Next by Date: Re: Group CGAffineTransform Animations?
  • Previous by thread: Strange problem with CFHash and CFEqual
  • Next by thread: Strange problem with CFDataRef, CFHash and CFEqual
  • Index(es):
    • Date
    • Thread