8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 17:23:03 +01:00

Add public method ensureCapacity to Array.

This commit is contained in:
Adriano dos Santos Fernandes 2023-05-15 22:47:28 -03:00
parent 412b29e1f0
commit d5069c7464

View File

@ -486,11 +486,16 @@ public:
}
}
void ensureCapacity(size_type newcapacity)
{
ensureCapacity(newcapacity, true);
}
protected:
size_type count, capacity;
T* data;
void ensureCapacity(size_type newcapacity, bool preserve = true)
void ensureCapacity(size_type newcapacity, bool preserve)
{
if (newcapacity > capacity)
{