diff options
Diffstat (limited to 'src/context/cdmap.h')
-rw-r--r-- | src/context/cdmap.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/context/cdmap.h b/src/context/cdmap.h index 45ff68a23..5e5a07f2f 100644 --- a/src/context/cdmap.h +++ b/src/context/cdmap.h @@ -363,7 +363,7 @@ public: return *obj; } - void insert(const Key& k, const Data& d) { + bool insert(const Key& k, const Data& d) { emptyTrash(); typename table_type::iterator i = d_map.find(k); @@ -371,8 +371,10 @@ public: if(i == d_map.end()) {// create new object Element* obj = new(true) Element(d_context, this, k, d); d_map[k] = obj; + return true; } else { (*i).second->set(d); + return false; } } |