Update to the latest SourcePawn and AMTL.

This commit is contained in:
David Anderson
2016-09-24 16:45:04 -07:00
parent 29d4ea3245
commit 27e812461f
7 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -181,7 +181,7 @@ struct TrieSnapshot
}
size_t length;
ke::AutoArray<int> keys;
ke::AutoPtr<int[]> keys;
BaseStringTable strings;
};
@@ -556,7 +556,7 @@ static cell_t CreateTrieSnapshot(IPluginContext *pContext, const cell_t *params)
TrieSnapshot *snapshot = new TrieSnapshot;
snapshot->length = pTrie->map.elements();
snapshot->keys = new int[snapshot->length];
snapshot->keys = ke::MakeUnique<int[]>(snapshot->length);
size_t i = 0;
for (StringHashMap<Entry>::iterator iter = pTrie->map.iter(); !iter.empty(); iter.next(), i++)
snapshot->keys[i] = snapshot->strings.AddString(iter->key.chars(), iter->key.length());