diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-22 21:28:42 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-23 08:49:30 +0100 |
commit | 2122952e740f345be1d905d77fcf0b7ed4278c07 (patch) | |
tree | a8a3b1236d29d4f9d00e9660d2ff423245c9b065 /lotuswordpro | |
parent | bf8627cbb7c40925eb29af004b9bd3d58322bcfa (diff) |
Better make the zero-initialization more explicit
...if initializing offset is necessary at all; a bit hard to tell from the code.
Change-Id: Ic1d7c97f174e3ed04b03f4004ca858029e9a258e
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpidxmgr.cxx | 12 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpidxmgr.hxx | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpidxmgr.cxx b/lotuswordpro/source/filter/lwpidxmgr.cxx index 3b6b3a707ba4..ff7fc215b194 100644 --- a/lotuswordpro/source/filter/lwpidxmgr.cxx +++ b/lotuswordpro/source/filter/lwpidxmgr.cxx @@ -159,7 +159,7 @@ void LwpIndexManager::ReadRootData(LwpObjectStream* pObjStrm) if (KeyCount) { //read object keys - LwpKey* akey = new LwpKey(); + LwpKey* akey = new LwpKey; akey->id.Read(pObjStrm); m_RootObjs.push_back(akey); @@ -167,7 +167,7 @@ void LwpIndexManager::ReadRootData(LwpObjectStream* pObjStrm) for (k = 1; k < KeyCount; k++) { - akey = new LwpKey(); + akey = new LwpKey; akey->id.ReadCompressed(pObjStrm, m_RootObjs[k-1]->id); m_RootObjs.push_back(akey); } @@ -197,7 +197,7 @@ void LwpIndexManager::ReadObjIndexData(LwpObjectStream* pObjStrm) if(KeyCount) { - LwpKey* akey = new LwpKey(); + LwpKey* akey = new LwpKey; akey->id.Read(pObjStrm); vObjIndexs.push_back(akey); @@ -205,7 +205,7 @@ void LwpIndexManager::ReadObjIndexData(LwpObjectStream* pObjStrm) for (k = 1; k < KeyCount; k++) { - akey = new LwpKey(); + akey = new LwpKey; akey->id.ReadCompressed(pObjStrm, vObjIndexs[k-1]->id); vObjIndexs.push_back(akey); } @@ -281,14 +281,14 @@ void LwpIndexManager::ReadLeafData( LwpObjectStream *pObjStrm ) if(KeyCount) { - LwpKey* akey = new LwpKey(); + LwpKey* akey = new LwpKey; //read object keys: id & offset akey->id.Read(pObjStrm); m_ObjectKeys.push_back(akey); for (sal_uInt16 k = 1; k < KeyCount; k++) { - akey = new LwpKey(); + akey = new LwpKey; akey->id.ReadCompressed(pObjStrm, m_ObjectKeys.at(m_nKeyCount+k-1)->id); m_ObjectKeys.push_back(akey); } diff --git a/lotuswordpro/source/filter/lwpidxmgr.hxx b/lotuswordpro/source/filter/lwpidxmgr.hxx index d1e9ff628517..c07bb984bcbf 100644 --- a/lotuswordpro/source/filter/lwpidxmgr.hxx +++ b/lotuswordpro/source/filter/lwpidxmgr.hxx @@ -71,7 +71,7 @@ struct LwpKey { LwpObjectID id; - sal_uInt32 offset; + sal_uInt32 offset = 0; }; /** * @brief LwpIndexManager, to read all index records and maintain the index information |