Skip to content

Commit d6d6ef5

Browse files
committed
patch to remove lrintf() definition for _WIN64
1 parent e9fc8d2 commit d6d6ef5

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

Patches/VXL/Patch.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@
66
file(COPY ${VXL_PATCH_DIR}/core/vbl/vbl_array_2d.h
77
DESTINATION ${VXL_SOURCE_DIR}/core/vbl/
88
)
9+
10+
# fixes an issue with duplicate definition of lrintf() on Windows
11+
file(COPY ${VXL_PATCH_DIR}/v3p/openjpeg2/opj_includes.h
12+
DESTINATION ${VXL_SOURCE_DIR}/v3p/openjpeg2/
13+
)

Patches/VXL/v3p/openjpeg2/opj_includes.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,6 @@ static INLINE long lrintf(float f){
100100

101101
return i;
102102
}
103-
#else
104-
static INLINE long lrintf(float x){
105-
long r;
106-
if (x>=0.f)
107-
{
108-
x+=0.5f;
109-
}
110-
else
111-
{
112-
x-=0.5f;
113-
}
114-
r = (long)(x);
115-
if ( x != (float)(r) ) return r;
116-
return 2*(r/2);
117-
}
118103
#endif
119104

120105
#endif

0 commit comments

Comments
 (0)