Hi,
It seems that the return value of erase() are different in Windows and
Unix/Linux. I've done some work in my previous projects like:
for ( DataMap::iterator itr=map.begin(); itr!=map.end(); )
{
DataMap::iterator old_itr = itr;
itr++;
map.erase( old_itr );
}
That's because "itr = map.erase(itr)" is not compilable with some gcc
versions.
My shame for not studying into the vpb source code yet. :)
Wang Rui
2009/6/10 <[email protected]>
> Hi Chen,
>
> I think the problem is also not using the iterator in the style that the
> iterator algorithm was originally intended. I have used your style as it
> hides the iterator declation when the for loop goes out of scope, but I
> think the expected usage was more along the lines of:
>
> {
> iterator iter = map.begin();
> while( iter != map.end() )
> iter = map.erase( ... );
> }
>
> PhilT
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org