From Colin McDonald, "

The bsp & mdl plugins have calls to atof() without including the
associated <stdlib.h> header.  This breaks the build on my Solaris setup.

Rather than adding the missing <stdlib.h> 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."
This commit is contained in:
Robert Osfield
2009-08-20 15:14:41 +00:00
parent 817780e67c
commit 5c6c51c887
2 changed files with 4 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
#include <osg/Group>
#include <osg/Object>
#include <osg/Material>
#include <osg/Math>
#include <osg/MatrixTransform>
#include <osg/Node>
#include <osg/Notify>
@@ -871,7 +872,7 @@ ref_ptr<StateSet> VBSPReader::readMaterialFile(std::string materialName)
// Interpret the setting
if (!token.empty())
{
alpha = atof(token.c_str());
alpha = osg::asciiToDouble(token.c_str());
}
}

View File

@@ -4,6 +4,7 @@
#include <osg/Group>
#include <osg/Object>
#include <osg/Material>
#include <osg/Math>
#include <osg/MatrixTransform>
#include <osg/Node>
#include <osg/Notify>
@@ -354,7 +355,7 @@ ref_ptr<StateSet> MDLReader::readMaterialFile(std::string materialName)
// Interpret the setting
if (!token.empty())
{
alpha = atof(token.c_str());
alpha = osg::asciiToDouble(token.c_str());
}
}