summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-07 09:15:27 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-07 09:15:27 +0000
commit016b9fc052607add5458aa90e939b902036b363a (patch)
tree2140fc75e1d74968de71f1d11c747a04e84aac9a /src
parent99b40e82570462fc7ec306329e3cc84cd3e7c145 (diff)
[trunk] Fix compilation in visual studio, inline cannot be used directly.
Fixes issue 272
Diffstat (limited to 'src')
-rw-r--r--src/bin/jp2/convert.c8
1 files changed, 7 insertions, 1 deletions
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 )
{