From b015d80d68aff5a050a29aebffd511b2f7a52682 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 11 Jul 2002 12:57:53 +0000 Subject: [PATCH] Fixes for win32 build --- src/osgPlugins/osg/StateSet.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/osg/StateSet.cpp b/src/osgPlugins/osg/StateSet.cpp index 162f73100..249249cb6 100644 --- a/src/osgPlugins/osg/StateSet.cpp +++ b/src/osgPlugins/osg/StateSet.cpp @@ -467,6 +467,13 @@ bool StateSet_readLocalData(Object& obj, Input& fr) return iteratorAdvanced; } +// 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)); +} + bool StateSet_writeLocalData(const Object& obj, Output& fw) { @@ -528,7 +535,7 @@ bool StateSet_writeLocalData(const Object& obj, Output& fw) const StateSet::TextureModeList& tml = stateset.getTextureModeList(); const StateSet::TextureAttributeList& tal = stateset.getTextureAttributeList(); - unsigned int maxUnit = std::max(tml.size(),tal.size()); + unsigned int maxUnit = mymax(tml.size(),tal.size()); for(unsigned int unit=0;unit