Commit 0ea1de85 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #94 from vpisarev/fixed_win32_compile_errors2

another fix in line descriptor module for Win32 MSVC
parents 70252d9a f1f579f5
......@@ -835,7 +835,7 @@ int BinaryDescriptorMatcher::SparseHashtable::init( int _b )
return 1;
size = UINT64_1 << ( b - 5 ); // size = 2 ^ b
table = (BucketGroup*) calloc( size, sizeof(BucketGroup) );
table = (BucketGroup*) calloc( (size_t)size, sizeof(BucketGroup) );
return 0;
......
......@@ -149,12 +149,11 @@ inline cv::Rect Vec4i2Rect( cv::Vec4i &v )
}
#if defined(_MSC_VER)
# include <intrin.h>
# define POPCNT(x) __popcnt(x)
# define POPCNT64(x) __popcnt64(x)
#endif
#if defined(_MSC_VER)
# include <intrin.h>
# define POPCNT(x) __popcnt(x)
# define POPCNT64(x) (__popcnt((unsigned)(x)) + __popcnt((unsigned)((uint64_t)(x) >> 32)))
#endif
#if defined(__GNUC__)
# define POPCNT(x) __builtin_popcount(x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment