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 /sd/source/ui/app | |
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 'sd/source/ui/app')
-rw-r--r-- | sd/source/ui/app/sdmod2.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index d749d2c73644..2ea60b588ef9 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -800,15 +800,15 @@ std::unique_ptr<SfxStyleFamilies> SdModule::CreateStyleFamilies() { std::unique_ptr<SfxStyleFamilies> pStyleFamilies(new SfxStyleFamilies); - pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Para, - SdResId(STR_GRAPHICS_STYLE_FAMILY), - BMP_STYLES_FAMILY_GRAPHICS, - RID_GRAPHICSTYLEFAMILY, SD_MOD()->GetResLocale())); - - pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Pseudo, - SdResId(STR_PRESENTATIONS_STYLE_FAMILY), - BMP_STYLES_FAMILY_PRESENTATIONS, - RID_PRESENTATIONSTYLEFAMILY, SD_MOD()->GetResLocale())); + pStyleFamilies->emplace_back(SfxStyleFamily::Para, + SdResId(STR_GRAPHICS_STYLE_FAMILY), + BMP_STYLES_FAMILY_GRAPHICS, + RID_GRAPHICSTYLEFAMILY, SD_MOD()->GetResLocale()); + + pStyleFamilies->emplace_back(SfxStyleFamily::Pseudo, + SdResId(STR_PRESENTATIONS_STYLE_FAMILY), + BMP_STYLES_FAMILY_PRESENTATIONS, + RID_PRESENTATIONSTYLEFAMILY, SD_MOD()->GetResLocale()); return pStyleFamilies; } |