Skip to content

Commit

Permalink
Fix warnings from vc++
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-ogre committed Jan 18, 2022
1 parent c2227ce commit 2bb622d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CDT/include/KDTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ class KDTree
point_type max = m_max;
NodeSplitDirection::Enum dir = m_rootDir;

coord_type mid;
NodeSplitDirection::Enum newDir;
// below: initialized only to suppress warnings
NodeSplitDirection::Enum newDir(NodeSplitDirection::X);
coord_type mid(0);
point_type newMin, newMax;
while(true)
{
Expand Down Expand Up @@ -205,7 +206,7 @@ class KDTree
const coord_type toMidSq = distToMid * distToMid;

const std::size_t iChild = whichChild(point, mid, t.dir);
if(iTask + 2 >= m_tasksStack.size())
if(iTask + 2 >= static_cast<int>(m_tasksStack.size()))
{
m_tasksStack.resize(
m_tasksStack.size() + StackDepthIncrement);
Expand Down

0 comments on commit 2bb622d

Please sign in to comment.