From 8d8977c412f09f4eb6e5775563f8b504716a7cec Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 16 Jan 2014 12:54:20 -0700 Subject: [PATCH] Hack for erasing from a container given a const_iterator --- .../sharedFoundation/src/shared/StlForwardDeclaration.h | 4 ++-- external/ours/library/archive/src/shared/AutoDeltaSet.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/engine/shared/library/sharedFoundation/src/shared/StlForwardDeclaration.h b/engine/shared/library/sharedFoundation/src/shared/StlForwardDeclaration.h index bd9cf89b..3780012c 100644 --- a/engine/shared/library/sharedFoundation/src/shared/StlForwardDeclaration.h +++ b/engine/shared/library/sharedFoundation/src/shared/StlForwardDeclaration.h @@ -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 { diff --git a/external/ours/library/archive/src/shared/AutoDeltaSet.h b/external/ours/library/archive/src/shared/AutoDeltaSet.h index af61b672..95652240 100644 --- a/external/ours/library/archive/src/shared/AutoDeltaSet.h +++ b/external/ours/library/archive/src/shared/AutoDeltaSet.h @@ -183,7 +183,14 @@ inline typename AutoDeltaSet::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(tmp, i)); + i++; + m_set.erase(tmp); +#else m_set.erase(i++); +#endif touch(); onErase(c.value); onChanged();