mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 15:23:02 +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
|
// Used as such in GlobalRWLock::blockingAstHandler
|
||||||
size_t getCount() const { return count; }
|
size_t getCount() const { return count; }
|
||||||
|
|
||||||
|
bool isEmpty() const { return count == 0; }
|
||||||
|
|
||||||
|
bool hasData() const { return count != 0; }
|
||||||
|
|
||||||
size_t getCapacity() const { return capacity; }
|
size_t getCapacity() const { return capacity; }
|
||||||
|
|
||||||
void push(const T& item)
|
void push(const T& item)
|
||||||
@ -326,6 +330,7 @@ public:
|
|||||||
memcpy(data + count, items, sizeof(T) * itemsSize);
|
memcpy(data + count, items, sizeof(T) * itemsSize);
|
||||||
count += itemsSize;
|
count += itemsSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
T pop()
|
T pop()
|
||||||
{
|
{
|
||||||
fb_assert(count > 0);
|
fb_assert(count > 0);
|
||||||
|
@ -1895,7 +1895,7 @@ InversionCandidate* OptimizerRetrieval::makeInversion(InversionCandidateList* in
|
|||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
|
|
||||||
if (!inversions->getCount()) {
|
if (inversions->isEmpty()) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user