Show
Ignore:
Timestamp:
08/20/09 16:59:29 (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."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/mdl/MDLReader.cpp

    r10483 r10539  
    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            }