diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-11 12:48:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-11 14:57:08 +0200 |
commit | 433492d50a1db601b0c2b7e375cead5f59910a31 (patch) | |
tree | b2b3d882d6e00fefa9584bc0fd1720de7488f184 /sfx2 | |
parent | dc328fdfa709929377de2be5f86f2e811a5eaa21 (diff) |
loplugin:moveparam in sfx2
Change-Id: I5408e47d6e2179bc34170c1728aa16e327ffbe56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123380
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/Deck.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 450cfe57fe19..6a5e45eb6be7 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -170,7 +170,7 @@ void Deck::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) * This container may contain existing panels that are * being re-used, and new ones too. */ -void Deck::ResetPanels(const SharedPanelContainer& rPanelContainer) +void Deck::ResetPanels(SharedPanelContainer&& rPanelContainer) { SharedPanelContainer aHiddens; @@ -186,7 +186,7 @@ void Deck::ResetPanels(const SharedPanelContainer& rPanelContainer) aHiddens.push_back(rpPanel); } } - maPanels = rPanelContainer; + maPanels = std::move(rPanelContainer); // Hidden ones always at the end maPanels.insert(std::end(maPanels), std::begin(aHiddens), std::end(aHiddens)); diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index d1245bc489a2..279b602cb2a6 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -787,7 +787,7 @@ void SidebarController::CreatePanels(std::u16string_view rDeckId, const Context& // mpCurrentPanels - may miss stuff (?) aNewPanels.resize(nWriteIndex); - pDeck->ResetPanels(aNewPanels); + pDeck->ResetPanels(std::move(aNewPanels)); } void SidebarController::SwitchToDeck ( |