Kaydet (Commit) ad0e7d57 authored tarafından Caolán McNamara's avatar Caolán McNamara

silence coverity#1414485 Uninitialized pointer field

Change-Id: If62f528b1118aee702f364aa448e36230512fac6
Reviewed-on: https://gerrit.libreoffice.org/39572Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 12a3f5ce
...@@ -54,14 +54,11 @@ public: ...@@ -54,14 +54,11 @@ public:
struct BlockInfo final struct BlockInfo final
{ {
BigPtrArray* const BigPtrArray* pBigArr; ///< in this array the block is located
pBigArr; ///< in this array the block is located
std::array<BigPtrEntry*, MAXENTRY> std::array<BigPtrEntry*, MAXENTRY>
mvData; ///< data block mvData; ///< data block
sal_uLong nStart, nEnd; ///< start- and end index sal_uLong nStart, nEnd; ///< start- and end index
sal_uInt16 nElem; ///< number of elements sal_uInt16 nElem; ///< number of elements
BlockInfo(BigPtrArray* b) : pBigArr(b) {}
}; };
class SW_DLLPUBLIC BigPtrArray class SW_DLLPUBLIC BigPtrArray
......
...@@ -156,7 +156,7 @@ void BigPtrArray::UpdIndex( sal_uInt16 pos ) ...@@ -156,7 +156,7 @@ void BigPtrArray::UpdIndex( sal_uInt16 pos )
*/ */
BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos ) BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos )
{ {
BlockInfo* p = new BlockInfo(this); BlockInfo* p = new BlockInfo;
m_vpInf.insert( m_vpInf.begin() + pos, p ); m_vpInf.insert( m_vpInf.begin() + pos, p );
if( pos ) if( pos )
...@@ -166,6 +166,7 @@ BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos ) ...@@ -166,6 +166,7 @@ BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos )
p->nEnd--; // no elements p->nEnd--; // no elements
p->nElem = 0; p->nElem = 0;
p->pBigArr = this;
return p; return p;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment