The lrintf function should use "long" instead of "int"
authorLuis Ibanez <luis.ibanez@gmail.com>
Sun, 22 Aug 2010 18:58:28 +0000 (18:58 +0000)
committerLuis Ibanez <luis.ibanez@gmail.com>
Sun, 22 Aug 2010 18:58:28 +0000 (18:58 +0000)
for the type of its internal variable.

libopenjpeg/opj_includes.h

index b67c957934b232255f31c2b8b9e0818fa653ada6..e232e54da05db529b0701d7560d19e88c19f8340 100644 (file)
@@ -104,7 +104,7 @@ static INLINE long lrintf(float f){
 }
 #else
 static INLINE long lrintf(float x){
-  int r;
+  long r;
   if (x>=0.f)
   {
      x+=0.5f;
@@ -113,7 +113,7 @@ static INLINE long lrintf(float x){
   {
      x-=0.5f;
   }
-  r = (int)(x);
+  r = (long)(x);
   if ( x != (float)(r) ) return r;
   return 2*(r/2);
 }