diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-09-12 22:40:51 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-09-12 22:40:51 (GMT) |
commit | f5f06c8e976ca45aebea42fe8c04bf7404357ac8 (patch) | |
tree | 8d0cdd2698e7806c1b12cc49e743b561e1082961 /src/nodecache.h | |
parent | 007c40848db9efd704694f2e7596cabed80da50f (diff) | |
parent | 5ac9162f1c67fd21737ead11d7ebc638bf4eef5f (diff) |
merge
Merge remote branch 'upstream/visitor' into visitortests
Conflicts:
src/export.cc
src/openscad.cc
src/polyset.cc
src/transform.cc
tests/CMakeLists.txt
tests/FindGLEW.cmake
tests/csgtermtest.cc
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) { |