Changeset 10540

Show
Ignore:
Timestamp:
08/20/09 17:14:41 (5 years ago)
Author:
robert
Message:

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."

Location:
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins

    • Property svn:mergeinfo set to /OpenSceneGraph/trunk:10539
  • OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins/bsp/VBSPReader.cpp

    • Property svn:mergeinfo set to /OpenSceneGraph/trunk/src/osgPlugins/bsp/VBSPReader.cpp:10482-10484,10539
    r10485 r10540  
    55#include <osg/Object> 
    66#include <osg/Material> 
     7#include <osg/Math> 
    78#include <osg/MatrixTransform> 
    89#include <osg/Node> 
     
    872873                if (!token.empty()) 
    873874                { 
    874                    alpha = atof(token.c_str()); 
     875                   alpha = osg::asciiToDouble(token.c_str()); 
    875876                } 
    876877            } 
  • OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins/mdl/MDLReader.cpp

    • Property svn:mergeinfo set to /OpenSceneGraph/trunk/src/osgPlugins/mdl/MDLReader.cpp:10093,10482-10483,10539
    r10485 r10540  
    55#include <osg/Object> 
    66#include <osg/Material> 
     7#include <osg/Math> 
    78#include <osg/MatrixTransform> 
    89#include <osg/Node> 
     
    355356                if (!token.empty()) 
    356357                { 
    357                    alpha = atof(token.c_str()); 
     358                   alpha = osg::asciiToDouble(token.c_str()); 
    358359                } 
    359360            }