Differences From Artifact [d6db7501d8]:
- File src/macros.h — part of check-in [c7bc7b93d9] at 2011-07-24 20:05:05 on branch trunk — Add a few defines for runtime methods so they always have the same name. (user: js, size: 9248) [annotate] [blame] [check-ins using]
To Artifact [fee9f03105]:
- File
src/macros.h
— 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: 8601) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
319 320 321 322 323 324 325 | } #define OF_HASH_FINALIZE(hash) \ { \ hash += (hash << 3); \ hash ^= (hash >> 11); \ hash += (hash << 15); \ } | | < < < < < < | | | | | < < < < < < < < < < < < | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | } #define OF_HASH_FINALIZE(hash) \ { \ hash += (hash << 3); \ hash ^= (hash >> 11); \ hash += (hash << 15); \ } #define OF_HASH_ADD_HASH(hash, other) \ { \ uint32_t otherCopy = other; \ OF_HASH_ADD(hash, (otherCopy >> 24) & 0xFF); \ OF_HASH_ADD(hash, (otherCopy >> 16) & 0xFF); \ OF_HASH_ADD(hash, (otherCopy >> 8) & 0xFF); \ OF_HASH_ADD(hash, otherCopy & 0xFF); \ } static OF_INLINE of_range_t of_range(size_t start, size_t length) { of_range_t range = { start, length }; |
︙ | ︙ |