diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-27 00:37:04 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-27 00:37:04 +0400 |
commit | 42dc0dc5efce87d0dbe96ba7892136774db34746 (patch) | |
tree | cfa0e5fd7b64ae661cb2b5908627a89fc568f32e /source/blender/blenlib/BLI_rect.h | |
parent | 5393922d1dd61720d3fc85fb04001749f366b765 (diff) |
Fix #33226: error loading .blend files with different endian on Mac. The cause
was wrong inline and pure attributes on the endian switch function.
Diffstat (limited to 'source/blender/blenlib/BLI_rect.h')
-rw-r--r-- | source/blender/blenlib/BLI_rect.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h index f84820e94f3..f2e26093711 100644 --- a/source/blender/blenlib/BLI_rect.h +++ b/source/blender/blenlib/BLI_rect.h @@ -33,6 +33,9 @@ * \ingroup bli */ +#include "DNA_vec_types.h" +#include "BLI_utildefines.h" + struct rctf; struct rcti; @@ -75,17 +78,6 @@ void BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src); void print_rctf(const char *str, const struct rctf *rect); void print_rcti(const char *str, const struct rcti *rect); -/* hrmf, we need to work out this inline stuff */ -#if defined(_MSC_VER) -# define BLI_INLINE static __forceinline -#elif defined(__GNUC__) -# define BLI_INLINE static inline __attribute((always_inline)) -#else -/* #warning "MSC/GNUC defines not found, inline non-functional" */ -# define BLI_INLINE static -#endif - -#include "DNA_vec_types.h" BLI_INLINE float BLI_rcti_cent_x_fl(const struct rcti *rct) { return (float)(rct->xmin + rct->xmax) / 2.0f; } BLI_INLINE float BLI_rcti_cent_y_fl(const struct rcti *rct) { return (float)(rct->ymin + rct->ymax) / 2.0f; } BLI_INLINE int BLI_rcti_cent_x(const struct rcti *rct) { return (rct->xmin + rct->xmax) / 2; } |