Update AMTL (#390)
This commit is contained in:
parent
e3ae451c09
commit
79d9fc530d
|
@ -355,7 +355,7 @@ static cell AMX_NATIVE_CALL TrieSnapshotCreate(AMX *amx, cell *params)
|
||||||
int index = TrieSnapshotHandles.create();
|
int index = TrieSnapshotHandles.create();
|
||||||
TrieSnapshot *snapshot = TrieSnapshotHandles.lookup(index);
|
TrieSnapshot *snapshot = TrieSnapshotHandles.lookup(index);
|
||||||
snapshot->length = t->map.elements();
|
snapshot->length = t->map.elements();
|
||||||
snapshot->keys = new int[snapshot->length];
|
snapshot->keys = ke::MakeUnique<int[]>(snapshot->length);
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for (StringHashMap<Entry>::iterator iter = t->map.iter(); !iter.empty(); iter.next(), i++)
|
for (StringHashMap<Entry>::iterator iter = t->map.iter(); !iter.empty(); iter.next(), i++)
|
||||||
|
|
|
@ -155,7 +155,7 @@ struct TrieSnapshot
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t length;
|
size_t length;
|
||||||
ke::AutoArray<int> keys;
|
ke::AutoPtr<int[]> keys;
|
||||||
BaseStringTable strings;
|
BaseStringTable strings;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 364541372c405ed172e7da778367a0392afdc24f
|
Subproject commit e3a888eab7ee73e7fbff9f3e2f0529a87b284d39
|
Loading…
Reference in New Issue
Block a user