From: Mathieu Malaterre Date: Fri, 7 Mar 2014 09:15:27 +0000 (+0000) Subject: [trunk] Fix compilation in visual studio, inline cannot be used directly. X-Git-Tag: version.2.0.1~4^2~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=016b9fc052607add5458aa90e939b902036b363a;p=openjpeg [trunk] Fix compilation in visual studio, inline cannot be used directly. Fixes issue 272 --- diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c index f99cd169..1e578c07 100644 --- a/src/bin/jp2/convert.c +++ b/src/bin/jp2/convert.c @@ -1419,7 +1419,13 @@ opj_image_t* pgxtoimage(const char *filename, opj_cparameters_t *parameters) { #define CLAMP(x,a,b) x < a ? a : (x > b ? b : x) -static inline int clamp( const int value, const int prec, const int sgnd ) +#ifdef _MSC_VER +#define STIN static __inline +#else +#define STIN static inline +#endif + +STIN int clamp( const int value, const int prec, const int sgnd ) { if( sgnd ) {