Show
Ignore:
Timestamp:
06/25/09 16:06:29 (5 years ago)
Author:
robert
Message:

From Mathias Froehlich, changes from atof to use osg::asciiToFloat() to avoid locale issues with atof

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osg/DisplaySettings.cpp

    r9191 r10413  
    1414#include <osg/ArgumentParser> 
    1515#include <osg/ApplicationUsage> 
     16#include <osg/Math> 
    1617#include <osg/Notify> 
    1718#include <osg/ref_ptr> 
     
    268269    if( (ptr = getenv("OSG_EYE_SEPARATION")) != 0) 
    269270    { 
    270         _eyeSeparation = atof(ptr); 
     271        _eyeSeparation = osg::asciiToFloat(ptr); 
    271272    } 
    272273 
    273274    if( (ptr = getenv("OSG_SCREEN_WIDTH")) != 0) 
    274275    { 
    275         _screenWidth = atof(ptr); 
     276        _screenWidth = osg::asciiToFloat(ptr); 
    276277    } 
    277278 
    278279    if( (ptr = getenv("OSG_SCREEN_HEIGHT")) != 0) 
    279280    { 
    280         _screenHeight = atof(ptr); 
     281        _screenHeight = osg::asciiToFloat(ptr); 
    281282    } 
    282283 
    283284    if( (ptr = getenv("OSG_SCREEN_DISTANCE")) != 0) 
    284285    { 
    285         _screenDistance = atof(ptr); 
     286        _screenDistance = osg::asciiToFloat(ptr); 
    286287    } 
    287288