include/sfx2/sidebar/Deck.hxx             |    2 +-
 sfx2/source/sidebar/Deck.cxx              |    4 ++--
 sfx2/source/sidebar/SidebarController.cxx |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 433492d50a1db601b0c2b7e375cead5f59910a31
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Oct 11 12:48:04 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Oct 11 14:57:08 2021 +0200

    loplugin:moveparam in sfx2
    
    Change-Id: I5408e47d6e2179bc34170c1728aa16e327ffbe56
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123380
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

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 (

Reply via email to