diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h index 21d8ed209ee..11c5e51b2c1 100644 --- a/source/blender/blenkernel/BKE_colortools.h +++ b/source/blender/blenkernel/BKE_colortools.h @@ -35,6 +35,16 @@ struct Histogram; struct ImBuf; struct rctf; +#if defined _WIN32 +# define DO_INLINE __inline +#elif defined (__sgi) +# define DO_INLINE +#elif defined (__sun) || defined (__sun__) +# define DO_INLINE +#else +# define DO_INLINE static inline +#endif + typedef enum CurveMappingPreset { CURVE_PRESET_LINE, CURVE_PRESET_SHARP, diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index ceab3eb259a..e29d908411c 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -880,7 +880,7 @@ void curvemapping_table_RGBA(CurveMapping *cumap, float **array, int *size) /* ***************** Histogram **************** */ -static inline int get_bin_float(float f) +DO_INLINE int get_bin_float(float f) { CLAMP(f, 0.0, 1.0);