From 5471ada6dac920c8575d6a0f3d611e951a9e5966 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 23 Feb 2003 15:50:57 +0000 Subject: [PATCH] Fixes to try and keep OSX and Win32 compiling with the new usage of std::max. --- include/osg/GLExtensions | 1 + src/osg/ApplicationUsage.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/osg/GLExtensions b/include/osg/GLExtensions index cb1ee1d23..342da8753 100644 --- a/include/osg/GLExtensions +++ b/include/osg/GLExtensions @@ -18,6 +18,7 @@ #if defined(WIN32) #define WIN32_LEAN_AND_MEAN + #define NOMINMAX #include #elif defined(__DARWIN_OSX__) #include diff --git a/src/osg/ApplicationUsage.cpp b/src/osg/ApplicationUsage.cpp index 8128d2b6b..c041d24b2 100644 --- a/src/osg/ApplicationUsage.cpp +++ b/src/osg/ApplicationUsage.cpp @@ -54,7 +54,7 @@ void ApplicationUsage::write(std::ostream& output, const ApplicationUsage::Usage citr!=um.end(); ++citr) { - maxNumCharsInOptions = std::max(maxNumCharsInOptions,citr->first.length()); + maxNumCharsInOptions = std::max(maxNumCharsInOptions,(unsigned int)citr->first.length()); } unsigned int fullWidth = widthOfOutput; @@ -89,7 +89,7 @@ void ApplicationUsage::write(std::ostream& output, const ApplicationUsage::Usage firstInLine = false; - unsigned int width = std::min(explanation.length()-pos,explanationWidth-offset); + unsigned int width = std::min((unsigned int)explanation.length()-pos,explanationWidth-offset); unsigned int slashn_pos = explanation.find('\n',pos); unsigned int extraSkip = 0; bool concatinated = false;