Changed int's to unsigned int's to avoid warnings

This commit is contained in:
Robert Osfield 2008-07-16 13:26:06 +00:00
parent 850034ab75
commit 5f0f80cab2
2 changed files with 5 additions and 5 deletions

View File

@ -38,9 +38,9 @@ class OSG_EXPORT KdTree : public osg::Shape
{
BuildOptions();
int _numVerticesProcessed;
int _targetNumTrianglesPerLeaf;
int _maxNumLevels;
unsigned int _numVerticesProcessed;
unsigned int _targetNumTrianglesPerLeaf;
unsigned int _maxNumLevels;
};

View File

@ -176,7 +176,7 @@ void BuildKdTree::computeDivisions(KdTree::BuildOptions& options)
_axisStack.reserve(options._maxNumLevels);
for(int level=0; level<options._maxNumLevels; ++level)
for(unsigned int level=0; level<options._maxNumLevels; ++level)
{
int axis = 0;
if (dimensions[0]>=dimensions[1])
@ -205,7 +205,7 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
KdTree::KdNode& node = _kdTree.getNode(nodeIndex);
bool needToDivide = level < _axisStack.size() &&
(node.first<0 && node.second>options._targetNumTrianglesPerLeaf);
(node.first<0 && static_cast<unsigned int>(node.second)>options._targetNumTrianglesPerLeaf);
if (!needToDivide)
{