fix node manager code (bugzilla #15, comment #2) in case where there's a hash collisi...
authorMorgan Deters <mdeters@gmail.com>
Mon, 1 Feb 2010 17:28:15 +0000 (17:28 +0000)
committerMorgan Deters <mdeters@gmail.com>
Mon, 1 Feb 2010 17:28:15 +0000 (17:28 +0000)
src/expr/node_manager.cpp

index 0d3fecac663273986a59d48b9b8a31875a80f304..c9a8197517069da457ee796312cddd374d8cd22c 100644 (file)
@@ -60,10 +60,8 @@ Node NodeManager::lookup(uint64_t hash, NodeValue* ev) {
     }
 
     // didn't find it, insert
-    std::vector<Node> v;
     Node e(ev);
-    v.push_back(e);
-    d_hash.insert(std::make_pair(hash, v));
+    i->second.push_back(e);
     return e;
   }
 }