Show
Ignore:
Timestamp:
06/25/09 18:07:49 (5 years ago)
Author:
robert
Message:

From Mathias Froehlich, "We are currently getting issues with locale settings and some osg plugins.
Therefore I have changed all the occurances of atof by asciiToFloat or
asciiToDouble.

I believe that it is safe to do so at least for all the plugins.
Included here are also asciiToFloat conversion of environment variables. One
might argue that these should be locale dependent. But IMO these should be
set and interpreted by osg independent of the current locale.
"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgDB/DatabasePager.cpp

    r10407 r10415  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
    22 * 
    33 * This library is open source and may be redistributed and/or modified under   
     
    908908    if( (ptr = getenv("OSG_EXPIRY_DELAY")) != 0) 
    909909    { 
    910         _expiryDelay = atof(ptr); 
     910        _expiryDelay = osg::asciiToDouble(ptr); 
    911911        osg::notify(osg::NOTICE)<<"Expiry delay = "<<_expiryDelay<<std::endl; 
    912912    } 
     
    927927        else 
    928928        { 
    929             setReleaseDelay(atof(ptr)); 
     929            setReleaseDelay(osg::asciiToDouble(ptr)); 
    930930        } 
    931931             
     
    966966    if( (ptr = getenv("OSG_MINIMUM_COMPILE_TIME_PER_FRAME")) != 0) 
    967967    { 
    968         _minimumTimeAvailableForGLCompileAndDeletePerFrame = atof(ptr); 
     968        _minimumTimeAvailableForGLCompileAndDeletePerFrame = osg::asciiToDouble(ptr); 
    969969    } 
    970970