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/osgPlugins/cfg/ConfigParser.y

    r10412 r10415  
    519519real   : PRTOKEN_FLOAT 
    520520    { 
    521         $$ = atof(flexer->YYText()); 
     521        $$ = osg::asciiToFloat(flexer->YYText()); 
    522522    } 
    523523    | PRTOKEN_INTEGER 
    524524    { 
    525         $$ = atof(flexer->YYText()); 
     525        $$ = osg::asciiToFloat(flexer->YYText()); 
    526526    } 
    527527    ; 
     
    530530floatparam : PRTOKEN_FLOAT 
    531531    { 
    532         $$ = atof(flexer->YYText()); 
     532        $$ = osg::asciiToFloat(flexer->YYText()); 
    533533    } 
    534534    ;