Refactor Trie natives to use HashMap instead of KTrie; add iteration API (bug 5892, r=ds).

--HG--
extra : rebase_source : a5bcf64a45d6734a97d78b4f4ea9aea48d17bb8b
This commit is contained in:
David Anderson
2013-08-29 10:09:02 -07:00
parent 88fdec6dd5
commit b261dde858
11 changed files with 758 additions and 250 deletions
+2 -1
View File
@@ -34,6 +34,7 @@
#include <stdlib.h>
#include <am-allocator-policies.h>
#include <am-utility.h>
#include <am-moveable.h>
namespace ke {
@@ -163,7 +164,7 @@ class Vector : public AllocPolicy
if (newdata == NULL)
return false;
for (size_t i = 0; i < nitems_; i++) {
new (&newdata[i]) T(data_[i]);
new (&newdata[i]) T(Moveable<T>(data_[i]));
data_[i].~T();
}
this->free(data_);