diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-10-16 14:18:43 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-10-16 18:13:33 +0200 |
commit | 8ec8bbcd4b1af73527859255d84af9f5990426bb (patch) | |
tree | cbb01125e13719c6c5134bf51de3e4bbff015b80 /sw/source/core/docnode/node.cxx | |
parent | 9d98fadd5e943f4c3f87d0c269815c7a0feee217 (diff) |
Simplify vector initialization in sw
Change-Id: Ibded138d113e56b78b12c96c7ecd8258564627ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123701
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sw/source/core/docnode/node.cxx')
-rw-r--r-- | sw/source/core/docnode/node.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 7c0403239130..e2598a1a53bd 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1668,9 +1668,7 @@ bool SwContentNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) sal_uInt16 nDel = 0; if ( !nWhich2 || nWhich2 < nWhich1 ) { - std::vector<sal_uInt16> aClearWhichIds; - aClearWhichIds.push_back( nWhich1 ); - nDel = ClearItemsFromAttrSet( aClearWhichIds ); + nDel = ClearItemsFromAttrSet( { nWhich1 } ); } else nDel = AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, nullptr, nullptr ); @@ -1736,9 +1734,7 @@ sal_uInt16 SwContentNode::ResetAllAttr() // If Modify is locked, do not send out any Modifys if( IsModifyLocked() ) { - std::vector<sal_uInt16> aClearWhichIds; - aClearWhichIds.push_back(0); - sal_uInt16 nDel = ClearItemsFromAttrSet( aClearWhichIds ); + sal_uInt16 nDel = ClearItemsFromAttrSet( { 0 } ); if( !GetpSwAttrSet()->Count() ) // Empty? Delete mpAttrSet.reset(); return nDel; |