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/applications/present3D/ReaderWriterP3D.cpp

    r10396 r10415  
    11271127        else if (cur->name == "duration") 
    11281128        { 
    1129             constructor.setLayerDuration(atof(cur->contents.c_str())); 
     1129            constructor.setLayerDuration(osg::asciiToDouble(cur->contents.c_str())); 
    11301130        } 
    11311131        else if (getKeyPosition(cur, keyPosition)) 
     
    13711371            else if (cur->name == "duration") 
    13721372            { 
    1373                 constructor.setSlideDuration(atof(cur->contents.c_str())); 
     1373                constructor.setSlideDuration(osg::asciiToDouble(cur->contents.c_str())); 
    13741374            } 
    13751375            else if (getKeyPosition(cur, keyPosition)) 
     
    18931893        else if (cur->name == "duration") 
    18941894        { 
    1895             constructor.setPresentationDuration(atof(cur->contents.c_str())); 
     1895            constructor.setPresentationDuration(osg::asciiToDouble(cur->contents.c_str())); 
    18961896        } 
    18971897        else if (getKeyPosition(cur, keyPosition))