Skip to content

Commit

Permalink
More min/max guard.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed May 1, 2018
1 parent c66c218 commit b4013f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions filters/private/pnp/GridPnp.hpp
Expand Up @@ -197,10 +197,10 @@ class GridPnp
const Point& p2 = outer[id + 1];

// Calculate bounding box.
m_xMin = std::min(m_xMin, xval(p1));
m_xMax = std::max(m_xMax, xval(p1));
m_yMin = std::min(m_yMin, yval(p1));
m_yMax = std::max(m_yMax, yval(p1));
m_xMin = (std::min)(m_xMin, xval(p1));
m_xMax = (std::max)(m_xMax, xval(p1));
m_yMin = (std::min)(m_yMin, yval(p1));
m_yMax = (std::max)(m_yMax, yval(p1));
}
}

Expand Down Expand Up @@ -272,7 +272,7 @@ class GridPnp
// I'm setting a minmum number of cells as 1000, because, why not?
// m_rings isn't necessarily an exact count of edges, but it's close
// enough for this purpose.
size_t m = std::max((size_t)1000, m_rings.size());
size_t m = (std::max)((size_t)1000, m_rings.size());

// See paper for this calc.
double scalex = ((m_xMax - m_xMin) * yAvgLen) /
Expand Down

0 comments on commit b4013f1

Please sign in to comment.