Changed types to avoid warnings under Windows
This commit is contained in:
parent
c4e8d6ee42
commit
682be50e2a
@ -39,9 +39,9 @@ class OSG_EXPORT KdTree : public osg::Shape
|
||||
_targetNumTrianglesPerLeaf(4),
|
||||
_maxNumLevels(24) {}
|
||||
|
||||
unsigned int _numVerticesProcessed;
|
||||
unsigned int _targetNumTrianglesPerLeaf;
|
||||
unsigned int _maxNumLevels;
|
||||
int _numVerticesProcessed;
|
||||
int _targetNumTrianglesPerLeaf;
|
||||
int _maxNumLevels;
|
||||
};
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ class OSG_EXPORT KdTree : public osg::Shape
|
||||
{
|
||||
int num = -leafNum-1;
|
||||
|
||||
if (num>_kdLeaves.size()-1)
|
||||
if (num>static_cast<int>(_kdLeaves.size())-1)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning: replaceChild("<<leafNum<<", leaf), num = "<<num<<" _kdLeaves.size()="<<_kdLeaves.size()<<std::endl;
|
||||
return leafNum;
|
||||
@ -155,7 +155,7 @@ class OSG_EXPORT KdTree : public osg::Shape
|
||||
KdLeaf& getLeaf(int leafNum)
|
||||
{
|
||||
int num = -leafNum-1;
|
||||
if (num<0 || num>_kdLeaves.size()-1)
|
||||
if (num<0 || num>static_cast<int>(_kdLeaves.size())-1)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning: getLeaf("<<leafNum<<", num = "<<num<<") _kdLeaves.size()="<<_kdLeaves.size()<<std::endl;
|
||||
}
|
||||
@ -173,7 +173,7 @@ class OSG_EXPORT KdTree : public osg::Shape
|
||||
/// note, nodeNum is positive to distinguish from leftNum
|
||||
KdNode& getNode(int nodeNum)
|
||||
{
|
||||
if (nodeNum<0 || nodeNum>_kdNodes.size()-1)
|
||||
if (nodeNum<0 || nodeNum>static_cast<int>(_kdNodes.size())-1)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning: getNode("<<nodeNum<<") _kdNodes.size()="<<_kdNodes.size()<<std::endl;
|
||||
}
|
||||
|
@ -140,8 +140,7 @@ void KdTree::computeDivisions(BuildOptions& options)
|
||||
|
||||
_axisStack.reserve(options._maxNumLevels);
|
||||
|
||||
int level = 0;
|
||||
for(unsigned int level=0; level<options._maxNumLevels; ++level)
|
||||
for(int level=0; level<options._maxNumLevels; ++level)
|
||||
{
|
||||
int axis = 0;
|
||||
if (dimensions[0]>=dimensions[1])
|
||||
|
Loading…
Reference in New Issue
Block a user