summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-11 12:48:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-11 14:57:08 +0200
commit433492d50a1db601b0c2b7e375cead5f59910a31 (patch)
treeb2b3d882d6e00fefa9584bc0fd1720de7488f184
parentdc328fdfa709929377de2be5f86f2e811a5eaa21 (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>
-rw-r--r--include/sfx2/sidebar/Deck.hxx2
-rw-r--r--sfx2/source/sidebar/Deck.cxx4
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx
index c8cd298b9229..fe73e6332d90 100644
--- a/include/sfx2/sidebar/Deck.hxx
+++ b/include/sfx2/sidebar/Deck.hxx
@@ -46,7 +46,7 @@ public:
DeckTitleBar* GetTitleBar() const;
tools::Rectangle GetContentArea() const;
- void ResetPanels(const SharedPanelContainer& rPanels);
+ void ResetPanels(SharedPanelContainer&& rPanels);
const SharedPanelContainer& GetPanels() const { return maPanels; }
std::shared_ptr<Panel> GetPanel(std::u16string_view panelId);
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 (