Suppressed hundreds of useless MSVC warnings (can be reenabled setting cmake variable ENABLE_NOISY_WARNINGS to ON). Fixed some of remaining warnings.

This commit is contained in:
Andrey Kamaev
2012-04-08 21:49:19 +00:00
parent c16a1d86cc
commit 7cc7a3f37d
23 changed files with 200 additions and 181 deletions

View File

@@ -105,7 +105,8 @@ void FastMarchingMethod::heapDown(int idx)
if (l < size_ && narrowBand_[l] < narrowBand_[smallest]) smallest = l;
if (r < size_ && narrowBand_[r] < narrowBand_[smallest]) smallest = r;
if (smallest == idx) break;
if (smallest == idx)
break;
else
{
std::swap(indexOf(narrowBand_[idx]), indexOf(narrowBand_[smallest]));

View File

@@ -292,7 +292,9 @@ public:
}
Point3_<uchar> cp = frame1(py1,px1), cq = frame1(qy1,qx1);
float distColor = sqr(cp.x-cq.x) + sqr(cp.y-cq.y) + sqr(cp.z-cq.z);
float distColor = sqr(static_cast<float>(cp.x-cq.x))
+ sqr(static_cast<float>(cp.y-cq.y))
+ sqr(static_cast<float>(cp.z-cq.z));
float w = 1.f / (sqrt(distColor * (dx*dx + dy*dy)) + eps);
uEst += w * (flowX(qy0,qx0) - dudx*dx - dudy*dy);