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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user