Compile with Visual Studio 2005

15 views
Skip to first unread message

Michael Daly

unread,
Jan 11, 2012, 11:44:26 AM1/11/12
to osgworks-users
I downloaded osgworks via svn (https://osgworks.googlecode.com/svn/
trunk). I got a compile error (release mode) in file ShortEdgeOp.cpp
(Lib osgwTools):

error C2664: 'std::_Tree<_Traits>::iterator
std::_Tree<_Traits>::erase(std::_Tree<_Traits>::iterator)' : cannot
convert parameter 1 from 'std::_Tree<_Traits>::const_iterator' to
'std::_Tree<_Traits>::iterator'

Original:
void removeTriangle(Triangle* const triangle)
{
TriangleSet::const_iterator itr=_triangles.find(triangle);
if (itr != _triangles.end())
_triangles.erase(itr);
}

Changed:
void removeTriangle(Triangle* const triangle)
{
TriangleSet::iterator itr=_triangles.find(triangle);
if (itr != _triangles.end())
_triangles.erase(itr);
}

The changed version works on Visual Studio 2005. Visual Studio 2008
works with either version.

Michael.

Paul Martz

unread,
Jan 11, 2012, 6:52:05 PM1/11/12
to osgwork...@googlegroups.com
Either I read right past it, or you didn't mention the line number. Anyhow, I
made what I *think* is the right change... Please do an update and verify. If I
did it wrong, please submit a patch through the issue tracking system. Thanks!
-Paul


--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/

Reply all
Reply to author
Forward
0 new messages