diff options
author | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-03-04 23:29:50 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-03-05 11:51:32 +0100 |
commit | aecdb5425538130ff4b82d56fa910bffcd9c3b81 (patch) | |
tree | e9a51f36470b7df4f4c3ea1b5aa57f36e398c84c /sfx2 | |
parent | d6886c340d1c940a4b3ab7e7ca499fff63183845 (diff) |
emplace_back: use perfect forwarding if possible
When using that new-ish method, try giving the compiler a chance to
construct in-place. Left out harder cases using initializer lists,
and might have missed slightly less obvious places.
Change-Id: Ifcc3a6d4599474457e37dd17a35c41fc73e7a17e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111980
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/classificationhelper.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx index d0bed6f97a67..ef864760381e 100644 --- a/sfx2/source/view/classificationhelper.cxx +++ b/sfx2/source/view/classificationhelper.cxx @@ -183,7 +183,7 @@ void SAL_CALL SfxClassificationParser::startElement(const OUString& rName, const OUString aIdentifier = xAttribs->getValueByName("Identifier"); // Create a new category and initialize it with the data that's true for all categories. - m_aCategories.emplace_back(SfxClassificationCategory()); + m_aCategories.emplace_back(); SfxClassificationCategory& rCategory = m_aCategories.back(); rCategory.m_aName = aName; |