From Ulrich Hertlein, "Attached is a patch that introduces 'static_cast<unsigned int>' on some instances where

the code returns '.size()' of a std::vector.  This caused some warnings when using clang++
on OS X."
This commit is contained in:
Robert Osfield
2013-05-14 16:12:21 +00:00
parent 93eb471d99
commit 1a683e2f83
16 changed files with 32 additions and 32 deletions

View File

@@ -526,7 +526,7 @@ class OSGTERRAIN_EXPORT CompositeLayer : public Layer
void removeLayer(unsigned int i) { _layers.erase(_layers.begin()+i); }
unsigned int getNumLayers() const { return _layers.size(); }
unsigned int getNumLayers() const { return static_cast<unsigned int>(_layers.size()); }
protected:

View File

@@ -139,7 +139,7 @@ class OSGTERRAIN_EXPORT TerrainTile : public osg::Group
const Layer* getColorLayer(unsigned int i) const { return i<_colorLayers.size() ? _colorLayers[i].get() : 0; }
/** Get the number of colour layers.*/
unsigned int getNumColorLayers() const { return _colorLayers.size(); }
unsigned int getNumColorLayers() const { return static_cast<unsigned int>(_colorLayers.size()); }
/** Set hint to whether the TerrainTechnique should create per vertex normals for lighting purposes.*/