diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-12 12:56:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-12 13:10:25 +0100 |
commit | 9c946e83cb773a0d0f05d27dab43cf6f934c7a56 (patch) | |
tree | 5e84ec66ee05ae1fbf0534554a46ebcf3868b390 /sw | |
parent | ce577c94e7c4c53930a43ab0fd78fcacbf2eb01c (diff) |
use std::unique_ptr
Change-Id: I74ab04b58c848961b1c4d30b68e8dd5ff5dd1f0d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 19b75d2662c1..3aada795060c 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -4079,17 +4079,17 @@ void WW8RStyle::ScanStyles() // investigate style dependencies rSI.m_nFilePos = pStStrm->Tell(); // remember FilePos sal_uInt16 nSkip; - WW8_STD* pStd = Read1Style(nSkip, nullptr); // read STD - rSI.m_bValid = (nullptr != pStd); + std::unique_ptr<WW8_STD> xStd(Read1Style(nSkip, nullptr)); // read STD + rSI.m_bValid = xStd.get() != nullptr; if (rSI.m_bValid) { - rSI.m_nBase = pStd->istdBase; // remember Basis - rSI.m_bColl = ( pStd->sgc == 1 ); // Para-Style + rSI.m_nBase = xStd->istdBase; // remember Basis + rSI.m_bColl = xStd->sgc == 1; // Para-Style } else rSI = SwWW8StyInf(); - delete pStd; + xStd.reset(); pStStrm->SeekRel( nSkip ); // skip Names and Sprms } } |