mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 10:03:03 +01:00
New methods for array classes
This commit is contained in:
parent
4f469c3355
commit
25d751ea32
@ -313,6 +313,10 @@ public:
|
||||
// Used as such in GlobalRWLock::blockingAstHandler
|
||||
size_t getCount() const { return count; }
|
||||
|
||||
bool isEmpty() const { return count == 0; }
|
||||
|
||||
bool hasData() const { return count != 0; }
|
||||
|
||||
size_t getCapacity() const { return capacity; }
|
||||
|
||||
void push(const T& item)
|
||||
@ -326,6 +330,7 @@ public:
|
||||
memcpy(data + count, items, sizeof(T) * itemsSize);
|
||||
count += itemsSize;
|
||||
}
|
||||
|
||||
T pop()
|
||||
{
|
||||
fb_assert(count > 0);
|
||||
|
@ -1895,7 +1895,7 @@ InversionCandidate* OptimizerRetrieval::makeInversion(InversionCandidateList* in
|
||||
*
|
||||
**************************************/
|
||||
|
||||
if (!inversions->getCount()) {
|
||||
if (inversions->isEmpty()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user