diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-23 15:02:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-24 08:43:55 +0200 |
commit | a2fc883173d7053cefe543620982051ae40c4b03 (patch) | |
tree | dac1b760925c8151dfd8a9cbe3a8735b68ab9f79 /sfx2 | |
parent | 010713e65ccade7b682c219707c8db3d864145c1 (diff) |
use more std::container::insert instead of std::copy
which is both more compact code, and more efficient, since the insert
method can do smarter resizing
Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/charmapcontrol.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx index 69e1a197d4ee..56af57524a88 100644 --- a/sfx2/source/control/charmapcontrol.cxx +++ b/sfx2/source/control/charmapcontrol.cxx @@ -117,11 +117,11 @@ void SfxCharmapCtrl::getFavCharacterList() { //retrieve recent character list css::uno::Sequence< OUString > rFavCharList( officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::get() ); - std::copy(rFavCharList.begin(), rFavCharList.end(), std::back_inserter(m_aFavCharList)); + m_aFavCharList.insert( m_aFavCharList.end(), rFavCharList.begin(), rFavCharList.end() ); //retrieve recent character font list css::uno::Sequence< OUString > rFavCharFontList( officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::get() ); - std::copy(rFavCharFontList.begin(), rFavCharFontList.end(), std::back_inserter(m_aFavCharFontList)); + m_aFavCharFontList.insert( m_aFavCharFontList.end(), rFavCharFontList.begin(), rFavCharFontList.end() ); } void SfxCharmapCtrl::updateFavCharControl() @@ -149,11 +149,11 @@ void SfxCharmapCtrl::getRecentCharacterList() { //retrieve recent character list css::uno::Sequence< OUString > rRecentCharList( officecfg::Office::Common::RecentCharacters::RecentCharacterList::get() ); - std::copy(rRecentCharList.begin(), rRecentCharList.end(), std::back_inserter(m_aRecentCharList)); + m_aRecentCharList.insert( m_aRecentCharList.end(), rRecentCharList.begin(), rRecentCharList.end() ); //retrieve recent character font list css::uno::Sequence< OUString > rRecentCharFontList( officecfg::Office::Common::RecentCharacters::RecentCharacterFontList::get() ); - std::copy(rRecentCharFontList.begin(), rRecentCharFontList.end(), std::back_inserter(m_aRecentCharFontList)); + m_aRecentCharFontList.insert( m_aRecentCharFontList.end(), rRecentCharFontList.begin(), rRecentCharFontList.end() ); } void SfxCharmapCtrl::updateRecentCharControl() |