From 5c6c51c8873d7f91efd5f59d70261cfa418228ea Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 20 Aug 2009 15:14:41 +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 94313ab53..1eeb7c6ff 100644 --- a/src/osgPlugins/bsp/VBSPReader.cpp +++ b/src/osgPlugins/bsp/VBSPReader.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -871,7 +872,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()); } }