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

Fixed wrong initializations of Dynamic_array

Other things:
- Added size() function to Dynamic_array()
This commit is contained in:
Monty
2021-03-19 18:15:23 +02:00
parent 8f33f49ebe
commit cccc96d66c
7 changed files with 14 additions and 10 deletions

View File

@ -112,7 +112,7 @@ private:
template <class Elem> class Dynamic_array
{
DYNAMIC_ARRAY array;
DYNAMIC_ARRAY array;
public:
Dynamic_array(PSI_memory_key psi_key, uint prealloc=16, uint increment=16)
{
@ -170,6 +170,8 @@ public:
return ((const Elem*)array.buffer) + array.elements - 1;
}
size_t size() const { return array.elements; }
const Elem *end() const
{
return back() + 1;