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:
@ -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;
|
||||
|
Reference in New Issue
Block a user