summaryrefslogtreecommitdiff
path: root/src/nodecache.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-09-11 08:51:55 (GMT)
committerMarius Kintel <marius@kintel.net>2011-09-11 08:51:55 (GMT)
commit95949cf961d84f65ad9bfb9f2dec7361059ca515 (patch)
treeb5d50e381362d013d8cce12c524571f013a990a2 /src/nodecache.h
parent18e97e0bd3f6bda4fdcd17de2a85173ba59b6b00 (diff)
Implemented CGAL caching
Diffstat (limited to 'src/nodecache.h')
-rw-r--r--src/nodecache.h5
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) {
contact: Jan Huwald // Impressum