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 14:59:29 +00:00
parent fe8822e496
commit 9f454c1714
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>
@@ -781,7 +782,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());
}
}