nlamprian / ICP

Implementation of the photogeometric ICP algorithm in OpenCL
MIT License
16 stars 7 forks source link

call to std::abs is ambiguous... #2

Open drhalftone opened 8 years ago

drhalftone commented 8 years ago

The code was applying std::abs to the difference of two unsigned integers, which results in an unsigned integer, which means there is no reason to take the absolute value. So I think you want to take the difference of two signed integers according to:

    for (uint i = 0; i < rows; ++i)
        ASSERT_LT (std::abs ((int)refMax[i] - (int)results[i]), eps);

that made the compiler error go away.