mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix Clang static analysis warnings
This commit is contained in:
@@ -292,6 +292,7 @@ public:
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
data.ensureAllocatedSize (numUsed + 1);
|
||||
bassert (data.elements != nullptr);
|
||||
data.elements [numUsed++] = newObject;
|
||||
|
||||
if (newObject != nullptr)
|
||||
@@ -322,6 +323,7 @@ public:
|
||||
indexToInsertAt = numUsed;
|
||||
|
||||
data.ensureAllocatedSize (numUsed + 1);
|
||||
bassert (data.elements != nullptr);
|
||||
|
||||
ObjectClass** const e = data.elements + indexToInsertAt;
|
||||
const int numToMove = numUsed - indexToInsertAt;
|
||||
@@ -388,6 +390,7 @@ public:
|
||||
else
|
||||
{
|
||||
data.ensureAllocatedSize (numUsed + 1);
|
||||
bassert (data.elements != nullptr);
|
||||
data.elements [numUsed++] = newObject;
|
||||
}
|
||||
}
|
||||
@@ -851,5 +854,4 @@ private:
|
||||
int numUsed;
|
||||
};
|
||||
|
||||
|
||||
#endif // BEAST_REFERENCECOUNTEDARRAY_BEASTHEADER
|
||||
|
||||
Reference in New Issue
Block a user