diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-24 11:13:08 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-30 13:10:38 -0400 |
commit | 898e806e5eb447e58dd48196fee101c8e5f9a84d (patch) | |
tree | c655646495d84564469caf9f6342c2d5cb938b65 /sc | |
parent | 574dd6d83a4cc6ccb214ad40c63c0c9c3f8229ec (diff) |
Wrap inside smart pointer on instantiation, for exception safety.
And boost::intrusive_ptr has a bool operator; no need to call get()
in this case.
Change-Id: I8ca965349c13dd0fedc16dc0d535b8c337fce52c
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column3.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index e69a8cc0934a..cb82b3cd2cfd 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -2119,15 +2119,14 @@ void ScColumn::RebuildFormulaGroups() } ScFormulaCellGroupRef xGroup = pPrev->GetCellGroup(); - if ( !xGroup.get() ) + if (!xGroup) { // create a new group ... - ScFormulaCellGroup *pGroup = new ScFormulaCellGroup(); - pGroup->mpDelta = pDelta; - pGroup->mnStart = rPrev.nRow; - pGroup->mnLength = 2; + xGroup.reset(new ScFormulaCellGroup); + xGroup->mpDelta = pDelta; + xGroup->mnStart = rPrev.nRow; + xGroup->mnLength = 2; - xGroup.reset( pGroup ); maFnGroups.push_back( xGroup ); pCur->SetCellGroup( xGroup ); |