summaryrefslogtreecommitdiff
path: root/impl/IdMap.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'impl/IdMap.hpp')
-rw-r--r--impl/IdMap.hpp10
1 files changed, 2 insertions, 8 deletions
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()];
}