Hack for erasing from a container given a const_iterator

This commit is contained in:
Anonymous
2014-01-16 12:54:20 -07:00
parent 1c0b21c92f
commit 8d8977c412
2 changed files with 9 additions and 2 deletions
@@ -31,8 +31,8 @@
// ======================================================================
// grab stlport configuration
//#include "stl/config/features.h" // uncomment for newer stlport versions
#include "stl/_config.h"
#include "stl/config/features.h" // uncomment for newer stlport versions
//#include "stl/_config.h"
namespace std
{
@@ -183,7 +183,14 @@ inline typename AutoDeltaSet<ValueType, ObjectType>::const_iterator AutoDeltaSet
c.value = *i;
m_commands.push_back(c);
++m_baselineCommandCount;
#ifdef WIN32
typename SetType::iterator tmp(m_set.begin());
std::advance(tmp, std::distance<const_iterator>(tmp, i));
i++;
m_set.erase(tmp);
#else
m_set.erase(i++);
#endif
touch();
onErase(c.value);
onChanged();