[Libreoffice-commits] core.git: sw/inc sw/source
Caolán McNamara
caolanm at redhat.com
Thu Jul 6 07:29:06 UTC 2017
sw/inc/bparr.hxx | 5 +----
sw/source/core/bastyp/bparr.cxx | 3 ++-
2 files changed, 3 insertions(+), 5 deletions(-)
New commits:
commit ad0e7d5734b3b759b1ef4aa794e2a31d79a2ecd1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 5 11:12:58 2017 +0100
silence coverity#1414485 Uninitialized pointer field
Change-Id: If62f528b1118aee702f364aa448e36230512fac6
Reviewed-on: https://gerrit.libreoffice.org/39572
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
index 90f00231fa3d..04b77eb16dee 100644
--- a/sw/inc/bparr.hxx
+++ b/sw/inc/bparr.hxx
@@ -54,14 +54,11 @@ public:
struct BlockInfo final
{
- BigPtrArray* const
- pBigArr; ///< in this array the block is located
+ BigPtrArray* pBigArr; ///< in this array the block is located
std::array<BigPtrEntry*, MAXENTRY>
mvData; ///< data block
sal_uLong nStart, nEnd; ///< start- and end index
sal_uInt16 nElem; ///< number of elements
-
- BlockInfo(BigPtrArray* b) : pBigArr(b) {}
};
class SW_DLLPUBLIC BigPtrArray
diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx
index 2cb854a402b0..8d7124a470ac 100644
--- a/sw/source/core/bastyp/bparr.cxx
+++ b/sw/source/core/bastyp/bparr.cxx
@@ -156,7 +156,7 @@ void BigPtrArray::UpdIndex( 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 );
if( pos )
@@ -166,6 +166,7 @@ BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos )
p->nEnd--; // no elements
p->nElem = 0;
+ p->pBigArr = this;
return p;
}
More information about the Libreoffice-commits
mailing list