deal with type casting issues

This commit is contained in:
Viet Dinh
2015-11-03 16:19:41 -05:00
parent f461d0cb7a
commit cfd5caf29d
2 changed files with 8 additions and 8 deletions

View File

@@ -2351,7 +2351,7 @@ void Core_SolvePolyTest::run( int )
template<typename T>
static void checkRoot(Mat& r, T re, T im)
{
for (size_t i = 0; i < r.total(); i++)
for (int i = 0; i < r.cols*r.rows; i++)
{
Vec<T, 2> v = *(Vec<T, 2>*)r.ptr(i);
if (fabs(re - v[0]) < 1e-6 && fabs(im - v[1]) < 1e-6)