From 9f454c1714879256453575efef6f7be9cdd3fd5c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 20 Aug 2009 14:59:29 +0000 Subject: [PATCH] From Colin McDonald, "The bsp & mdl plugins have calls to atof() without including the associated header. This breaks the build on my Solaris setup. Rather than adding the missing include, I have changed the atof() calls to osg::asciiToDouble(). This is the same as was done throughout the other plugins recently, for locale independance. I've attached updates to the svn trunk, the fix is also appropriate for the 2.8.* branch." --- src/osgPlugins/bsp/VBSPReader.cpp | 3 ++- src/osgPlugins/mdl/MDLReader.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/bsp/VBSPReader.cpp b/src/osgPlugins/bsp/VBSPReader.cpp index 157173e08..c3a0a2f3b 100644 --- a/src/osgPlugins/bsp/VBSPReader.cpp +++ b/src/osgPlugins/bsp/VBSPReader.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -781,7 +782,7 @@ ref_ptr VBSPReader::readMaterialFile(std::string materialName) // Interpret the setting if (!token.empty()) { - alpha = atof(token.c_str()); + alpha = osg::asciiToDouble(token.c_str()); } } diff --git a/src/osgPlugins/mdl/MDLReader.cpp b/src/osgPlugins/mdl/MDLReader.cpp index 2667be23a..46af589dd 100644 --- a/src/osgPlugins/mdl/MDLReader.cpp +++ b/src/osgPlugins/mdl/MDLReader.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -354,7 +355,7 @@ ref_ptr MDLReader::readMaterialFile(std::string materialName) // Interpret the setting if (!token.empty()) { - alpha = atof(token.c_str()); + alpha = osg::asciiToDouble(token.c_str()); } }