diff --git a/src/osg/ApplicationUsage.cpp b/src/osg/ApplicationUsage.cpp index 0bfdc3f38..8128d2b6b 100644 --- a/src/osg/ApplicationUsage.cpp +++ b/src/osg/ApplicationUsage.cpp @@ -1,5 +1,7 @@ #include +#include + using namespace osg; ApplicationUsage::ApplicationUsage(const std::string& commandLineUsage): diff --git a/src/osg/State.cpp b/src/osg/State.cpp index c27d04519..30728c035 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -198,12 +198,13 @@ void State::captureCurrentState(StateSet& stateset) const } -// visual studio 6.0 doesn't appear to define std::max?!? So do our own here.. -template -T mymax(const T& a,const T& b) -{ - return (((a) > (b)) ? (a) : (b)); -} +// revert to using std::max for consistency, std::max should be defined by STLport on VS. +// // visual studio 6.0 doesn't appear to define std::max?!? So do our own here.. +// template +// T mymax(const T& a,const T& b) +// { +// return (((a) > (b)) ? (a) : (b)); +// } void State::apply(const StateSet* dstate) { @@ -224,9 +225,9 @@ void State::apply(const StateSet* dstate) const StateSet::TextureAttributeList& ds_textureAttributeList = dstate->getTextureAttributeList(); unsigned int unit; - unsigned int unitMax = mymax(static_cast(ds_textureModeList.size()),static_cast(ds_textureAttributeList.size())); - unitMax = mymax(static_cast(unitMax),static_cast(_textureModeMapList.size())); - unitMax = mymax(static_cast(unitMax),static_cast(_textureAttributeMapList.size())); + unsigned int unitMax = std::max(static_cast(ds_textureModeList.size()),static_cast(ds_textureAttributeList.size())); + unitMax = std::max(static_cast(unitMax),static_cast(_textureModeMapList.size())); + unitMax = std::max(static_cast(unitMax),static_cast(_textureAttributeMapList.size())); for(unit=0;unit