#include <cmath>
#include <cstdlib>
#include <string.h>
+#ifdef _MSC_VER
+typedef unsigned uint32_t;
+typedef unsigned __int64 uint64_t;
+#else
#include <stdint.h>
+#endif
#include "defines.h"
/* Process 4 items with each loop for efficiency. */
while (a < lastgroup) {
- diff0 = a[0] - b[0];
- diff1 = a[1] - b[1];
- diff2 = a[2] - b[2];
- diff3 = a[3] - b[3];
+ diff0 = (ResultType)(a[0] - b[0]);
+ diff1 = (ResultType)(a[1] - b[1]);
+ diff2 = (ResultType)(a[2] - b[2]);
+ diff3 = (ResultType)(a[3] - b[3]);
result += diff0 * diff0 + diff1 * diff1 + diff2 * diff2 + diff3 * diff3;
a += 4;
b += 4;
*/
bool test(size_t index) const
{
- return (bool)(bitset_[index / cell_bit_size_] & (size_t(1) << (index % cell_bit_size_)));
+ return (bitset_[index / cell_bit_size_] & (size_t(1) << (index % cell_bit_size_))) != 0;
}
private:
FLANN_DEPRECATED inline void set_distance_type(flann_distance_t distance_type, int order = 0)
{
- flann_distance_type_() = distance_type;
+ flann_distance_type_() = (flann_distance_t)((size_t)distance_type + order*0);
}
}
// Repeat several trials
double bestNewPot = -1;
- int bestNewIndex;
+ int bestNewIndex = 0;
for (int localTrial = 0; localTrial < numLocalTries; localTrial++) {
// Choose our center - have to be slightly careful to return a valid answer even accounting
#include <map>
#endif
#include <math.h>
-#include <stdint.h>
+#include <stddef.h>
#include "dynamic_bitset.h"
#include "matrix.h"
size_t mask_block = *pmask_block;
while (mask_block) {
// Get the lowest set bit in the mask block
- size_t lowest_bit = mask_block & (-mask_block);
+ size_t lowest_bit = mask_block & (-(ptrdiff_t)mask_block);
// Add it to the current subsignature if necessary
subsignature += (feature_block & lowest_bit) ? bit_index : 0;
// Reset the bit in the mask block