Differences From Artifact [b658da002c]:
- File
src/OFObject.m
— part of check-in
[44f45c2e35]
at
2017-01-09 17:36:36
on branch trunk
— Update copyright
Forgot to add 2017, even though I already did quite some changes in
2017. (user: js, size: 25083) [annotate] [blame] [check-ins using]
To Artifact [21ee30041a]:
- File
src/OFObject.m
— part of check-in
[a55371e2c9]
at
2017-02-03 22:42:13
on branch trunk
— Improve -[OFObject hash]
This shifted the wrong way, and there's also no point in not hashing
over the entire address. (user: js, size: 25107) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
803 804 805 806 807 808 809 | - (uint32_t)hash { uintptr_t ptr = (uintptr_t)self; uint32_t hash; OF_HASH_INIT(hash); | | | | 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 | - (uint32_t)hash { uintptr_t ptr = (uintptr_t)self; uint32_t hash; OF_HASH_INIT(hash); for (size_t i = 0; i < sizeof(ptr); i++) { OF_HASH_ADD(hash, ptr & 0xFF); ptr >>= 8; } OF_HASH_FINALIZE(hash); return hash; } |
︙ | ︙ |