ImageCache and 64 bit code

I noticed the following in ImageCache:

Image* ImageCache::getFromMemory (const void* imageData, const int dataSize) { const int hashCode = (int) (pointer_sized_int) imageData;

It looks like this might not be 64-bit safe, since even in 64 bit code, an int is still 32 bits. I’m wondering if it might be better to store the hash codes as “pointer_sized_int”.


True. It’s not particularly likely that two pointers would share the same lower 32 bits, but you’re right, it’s worth me tweaking it…

I agree that it’s unlikely, but it sure would be a pain to track down if it ever happened. Thanks.