diff options
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/cdmap.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/context/cdmap.h b/src/context/cdmap.h index 994ff76b4..dc3448e52 100644 --- a/src/context/cdmap.h +++ b/src/context/cdmap.h @@ -244,16 +244,17 @@ public: emptyTrash(); typename __gnu_cxx::hash_map<Key, CDOmap<Key, Data, HashFcn>*, HashFcn>::iterator - i(d_map.find(k)); + i = d_map.find(k); - if(i == d_map.end()) { // Create new object + if(i == d_map.end()) {// create new object CDOmap<Key, Data, HashFcn>* - obj(new(true) CDOmap<Key, Data, HashFcn>(d_context, this, k, d)); + obj = new(true) CDOmap<Key, Data, HashFcn>(d_context, this, k, d); d_map[k] = obj; } else { (*i).second->set(d); } } + // FIXME: no erase(), too much hassle to implement efficiently... // Iterator for CDMap: points to pair<const Key, CDOMap<Key, Data, HashFcn>&>; |