1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

cleanup: DYNAMIC_ARRAY -> Dynamic_array<ACL_DB> acl_dbs

This commit is contained in:
Sergei Golubchik
2018-12-06 00:48:00 +01:00
parent 17e8570285
commit 8a37ce0767
2 changed files with 48 additions and 42 deletions

View File

@ -107,8 +107,7 @@ public:
void init(uint prealloc=16, uint increment=16)
{
my_init_dynamic_array(&array, sizeof(Elem), prealloc, increment,
MYF(0));
init_dynamic_array2(&array, sizeof(Elem), 0, prealloc, increment, MYF(0));
}
/**
@ -201,6 +200,11 @@ public:
set_dynamic(&array, &el, idx);
}
void freeze()
{
freeze_size(&array);
}
bool resize(size_t new_size, Elem default_val)
{
size_t old_size= elements();
@ -223,6 +227,11 @@ public:
delete_dynamic(&array);
}
void free_memory()
{
delete_dynamic(&array);
}
typedef int (*CMP_FUNC)(const Elem *el1, const Elem *el2);
void sort(CMP_FUNC cmp_func)