Differences From Artifact [8de83ff694]:
- File src/OFDoubleVector.m — part of check-in [927dbf6e7d] at 2011-08-07 16:57:49 on branch trunk — Add -[makeImmutable] to all mutable classes and use it. (user: js, size: 8282) [annotate] [blame] [check-ins using]
To Artifact [3c930c2cbc]:
- File
src/OFDoubleVector.m
— part of check-in
[f3db074478]
at
2011-09-17 19:18:09
on branch trunk
— Make hashes independant of endianess in OF{Float,Double}{Vector,Matrix}.
Also removes unnecessary OF_HASH_ADD_INT* macros (except
OF_HASH_ADD_INT32 which was often used to hash hashes and is now called
OF_HASH_ADD_HASH). (user: js, size: 8370) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
207 208 209 210 211 212 213 | size_t i; uint32_t hash; OF_HASH_INIT(hash); for (i = 0; i < dimension; i++) { union { | | | > | > | | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | size_t i; uint32_t hash; OF_HASH_INIT(hash); for (i = 0; i < dimension; i++) { union { double d; uint8_t b[sizeof(double)]; } u; uint8_t j; u.d = of_bswap_double_if_be(data[i]); for (j = 0; j < sizeof(double); j++) OF_HASH_ADD(hash, u.b[j]); } OF_HASH_FINALIZE(hash); return hash; } |
︙ | ︙ |