Hi J-S,

On Mon, Jun 27, 2011 at 8:29 PM, Jean-Sébastien Guay
<[email protected]> wrote:
> Here is the file (src/osgPlugins/osg/AsciiStreamOperator.h), and you might
> want to put a descriptive comment so people know why this was done... After
> all, my instinct would be to replace a loop with a single function call
> too...

Many thanks for the fix, finally back on track....albeit rather later
in the evening than I had planned.  The comment of explanation I went
for was:


    virtual bool matchString( const std::string& str )
    {
        std::string s; readString(s);
        if ( s==str ) return true;
        else
        {
            // originally "_in->seekg( -(int)(s.length()),
std::ios::cur );" was used below but
            // problems under windows occurred when reading ascii
files with unix line endings.
            // The workaround for this problem was to unget each of
the characters in term,
            // hacky yes, but at least it works!
            for (unsigned int i = 0; i < s.length(); ++i)
                _in->unget();
        }
        return false;
    }

Let me know if it doesn't make sense.  I've now merged this change
with svn/trunk and the OSG-3.0 branch.

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

Reply via email to