Overview
Comment: | Add a few OF_CONST_FUNC |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
cbff518f16164a62bd1fdc96c98cf6d7 |
User & Date: | js on 2014-05-06 21:38:23 |
Other Links: | manifest | tags |
Context
2014-05-07
| ||
02:46 | atomic.h: Minor style improvements check-in: 461e70403e user: js tags: trunk | |
2014-05-06
| ||
21:38 | Add a few OF_CONST_FUNC check-in: cbff518f16 user: js tags: trunk | |
21:37 | Update buildsys check-in: 9ca6458c5a user: js tags: trunk | |
Changes
Modified src/macros.h from [c9c04d682a] to [4a0014aee6].
︙ | ︙ | |||
56 57 58 59 60 61 62 | #if __STDC_VERSION__ >= 201112L && defined(OF_HAVE_MAX_ALIGN_T) # define OF_BIGGEST_ALIGNMENT _Alignof(max_align_t) #else # ifdef __BIGGEST_ALIGNMENT__ # define OF_BIGGEST_ALIGNMENT __BIGGEST_ALIGNMENT__ # else | | | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #if __STDC_VERSION__ >= 201112L && defined(OF_HAVE_MAX_ALIGN_T) # define OF_BIGGEST_ALIGNMENT _Alignof(max_align_t) #else # ifdef __BIGGEST_ALIGNMENT__ # define OF_BIGGEST_ALIGNMENT __BIGGEST_ALIGNMENT__ # else # /* Hopefully no arch needs more than 16 byte alignment */ # define OF_BIGGEST_ALIGNMENT 16 # endif #endif #ifdef __GNUC__ # if defined(__x86_64__) || defined(__amd64__) # define OF_X86_64_ASM |
︙ | ︙ | |||
386 387 388 389 390 391 392 | 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); \ } | | | | | | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | 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_CONST_FUNC of_range(size_t start, size_t length) { of_range_t range = { start, length }; return range; } static OF_INLINE of_point_t OF_CONST_FUNC of_point(float x, float y) { of_point_t point = { x, y }; return point; } static OF_INLINE of_dimension_t OF_CONST_FUNC of_dimension(float width, float height) { of_dimension_t dimension = { width, height }; return dimension; } static OF_INLINE of_rectangle_t OF_CONST_FUNC of_rectangle(float x, float y, float width, float height) { of_rectangle_t rectangle = { of_point(x, y), of_dimension(width, height) }; |
︙ | ︙ |