diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-11 08:51:55 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-11 08:51:55 (GMT) |
commit | 95949cf961d84f65ad9bfb9f2dec7361059ca515 (patch) | |
tree | b5d50e381362d013d8cce12c524571f013a990a2 /src/nodecache.h | |
parent | 18e97e0bd3f6bda4fdcd17de2a85173ba59b6b00 (diff) |
Implemented CGAL caching
Diffstat (limited to 'src/nodecache.h')
-rw-r--r-- | src/nodecache.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nodecache.h b/src/nodecache.h index cc3355e..61afe3e 100644 --- a/src/nodecache.h +++ b/src/nodecache.h @@ -25,9 +25,10 @@ public: else return this->nullvalue; } - void insert(const class AbstractNode &node, const std::string & value) { + /*! Returns a reference to the cached string copy */ + const std::string &insert(const class AbstractNode &node, const std::string & value) { if (this->cache.size() <= node.index()) this->cache.resize(node.index() + 1); - this->cache[node.index()] = value; + return this->cache[node.index()] = value; } void remove(const class AbstractNode &node) { |