Commit 56b27bcc authored by Andrey Kamaev's avatar Andrey Kamaev

Fix inconsistent argument type in HammingLUT distance (flann)

this fixes 64-bit MSVC warning
parent 044d38a0
...@@ -382,7 +382,7 @@ struct HammingLUT ...@@ -382,7 +382,7 @@ struct HammingLUT
/** this will count the bits in a ^ b /** this will count the bits in a ^ b
*/ */
ResultType operator()(const unsigned char* a, const unsigned char* b, int size) const ResultType operator()(const unsigned char* a, const unsigned char* b, size_t size) const
{ {
static const uchar popCountTable[] = static const uchar popCountTable[] =
{ {
...@@ -396,7 +396,7 @@ struct HammingLUT ...@@ -396,7 +396,7 @@ struct HammingLUT
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
}; };
ResultType result = 0; ResultType result = 0;
for (int i = 0; i < size; i++) { for (size_t i = 0; i < size; i++) {
result += popCountTable[a[i] ^ b[i]]; result += popCountTable[a[i] ^ b[i]];
} }
return result; return result;
......
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