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:
@@ -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:
|
||||
|
||||
|
||||
@@ -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.*/
|
||||
|
||||
Reference in New Issue
Block a user