Hi All,

On Mon, Nov 24, 2008 at 11:41 AM, Robert Osfield
<[EMAIL PROTECTED]> wrote:
> I will do a purge of the OpenGL related atof functions.  It'll be
> interesting to see where problem points may have been, I'll ping this
> thread once these changes are checked in.

I have now converted the OpenGL related atof usage across to using the
osg::asciiToFloat function instead, this is now checked into svn.

There are other places in the OSG that use atof, some main be
appropriate to leave as being locale sensitive, others I think it
would be best to convert to use osg::asciiToFloat/asciiToDouble.  The
big question which ones...

The files that still use atof are:

parsing env vars/ReaderWriter::Options:
--------------------------------------------------
./osg/DisplaySettings.cpp
./osg/CullSettings.cpp
./osgDB/DatabasePager.cpp
./osgGA/DriveManipulator.cpp
./osgViewer/ViewerEventHandlers.cpp
./osgPlugins/ive/DataOutputStream.cpp
./osgPlugins/txp/ReaderWriterTXP.cpp
./osgPlugins/txp/TXPParser.cpp
./osgPlugins/normals/ReaderWriterNormals.cpp

command line argument parsing:
------------------------------------------
./osg/ArgumentParser.cpp

file parsing:
--------------
./osgPlugins/x/types.cpp
./osgPlugins/dw/ReaderWriterDW.cpp
./osgPlugins/cfg/ConfigParser.cpp

--

All the file parsing code I think should be converted across to
asciiToFloat as these formats won't be explictly defining which
convention they use so one can't decide based on that particular file
- one has to assume a single interpretation on all files and the
standard '.' decimal place will the one used.

The env var/options and command line parsing are OSG specific, and
will be developer dependant, so if the user is consistent themselves
and set the locale to be consistent with this then they could probably
safely use either convention, however, there quite a bit of scope for
the locale to not be set at all times and on all platforms the same
(i.e. different end users will install on different platforms so
locale will vary), so my inclination is formal decide to use the '.'
decimal place convention for all OSG env vars/options and command line
parsing, and following on from this use osg::asciitToFloat for all
these parsing methods.

Thoughts everybody?
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to