From a7c69ec12aec23036bfdb6447e7c38b001a40f3d Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Mon, 15 Oct 2012 11:45:31 +1100 Subject: Fix up to build with clang (and fix another bug) - Remove exceptions - Remove dynamic casts The bug was relating to MaxStrategy not cleaning up the influence sets after propagating changes. I just added a call to .clear() and it seems fine. --- impl/IdMap.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'impl/IdMap.hpp') diff --git a/impl/IdMap.hpp b/impl/IdMap.hpp index 27c0806..ed0723e 100644 --- a/impl/IdMap.hpp +++ b/impl/IdMap.hpp @@ -32,17 +32,11 @@ struct IdMap { return *this; } virtual const V& operator[] (const T& x) const { - if (x.id() >= _length) { - std::cout << "throw exception" << *(char*)NULL; - //throw "Array out of bounds"; - } + assert(x.id() < _length); return _assignment[x.id()]; } virtual V& operator[] (const T& x) { - if (x.id() >= _length) { - std::cout << "throw exception" << *(char*)NULL; - //throw "Array out of bounds"; - } + assert(x.id() < _length); return _assignment[x.id()]; } -- cgit v1.2.3