bugfix: only resize if needed, else nodes get deleted

stl_dim
Marius Kintel 2010-03-17 20:21:54 +01:00
parent 75cd0f291a
commit adb2d73da3
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ public:
}
void insert(const class AbstractNode &node, const T & value) {
this->cache.resize(node.index() + 1);
if (this->cache.size() <= node.index()) this->cache.resize(node.index() + 1);
this->cache[node.index()] = value;
}