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

@@ -220,7 +220,7 @@ class OSG_EXPORT StateSet : public Object
inline const TextureModeList& getTextureModeList() const { return _textureModeList; }
/** Return the number texture units active in the TextureModeList.*/
inline unsigned int getNumTextureModeLists() const { return _textureModeList.size(); }
inline unsigned int getNumTextureModeLists() const { return static_cast<unsigned int>(_textureModeList.size()); }
typedef std::vector<AttributeList> TextureAttributeList;
@@ -257,7 +257,7 @@ class OSG_EXPORT StateSet : public Object
inline const TextureAttributeList& getTextureAttributeList() const { return _textureAttributeList; }
/** Return the number of texture units active in the TextureAttributeList.*/
inline unsigned int getNumTextureAttributeLists() const { return _textureAttributeList.size(); }
inline unsigned int getNumTextureAttributeLists() const { return static_cast<unsigned int>(_textureAttributeList.size()); }
void setAssociatedModes(const StateAttribute* attribute, StateAttribute::GLModeValue value);