sfx2/inc/sidebar/UnoDeck.hxx | 4 ++-- sfx2/inc/sidebar/UnoPanel.hxx | 4 ++-- sfx2/source/sidebar/UnoDeck.cxx | 12 ++++++------ sfx2/source/sidebar/UnoPanel.cxx | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-)
New commits: commit e9f407fbf0ede1760518b2e58931eba381879717 Author: Noel Grandin <[email protected]> AuthorDate: Thu Jun 9 09:01:17 2022 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Jun 9 11:27:03 2022 +0200 can pass by const& here no need to copy Change-Id: I1fcc5d645a8f5278e2122a168b00c846d75bc091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135522 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sfx2/inc/sidebar/UnoDeck.hxx b/sfx2/inc/sidebar/UnoDeck.hxx index 88497c03ae3d..42c975c44d3b 100644 --- a/sfx2/inc/sidebar/UnoDeck.hxx +++ b/sfx2/inc/sidebar/UnoDeck.hxx @@ -54,8 +54,8 @@ private: const OUString mDeckId; - sal_Int32 GetMaxOrderIndex(sfx2::sidebar::ResourceManager::DeckContextDescriptorContainer aDecks); - sal_Int32 GetMinOrderIndex(sfx2::sidebar::ResourceManager::DeckContextDescriptorContainer aDecks); + sal_Int32 GetMaxOrderIndex(const sfx2::sidebar::ResourceManager::DeckContextDescriptorContainer& rDecks); + sal_Int32 GetMinOrderIndex(const sfx2::sidebar::ResourceManager::DeckContextDescriptorContainer& rDecks); }; diff --git a/sfx2/inc/sidebar/UnoPanel.hxx b/sfx2/inc/sidebar/UnoPanel.hxx index 2b1197eb95f7..4e148befdf8d 100644 --- a/sfx2/inc/sidebar/UnoPanel.hxx +++ b/sfx2/inc/sidebar/UnoPanel.hxx @@ -62,8 +62,8 @@ private: VclPtr<sfx2::sidebar::Deck> mpDeck; std::weak_ptr<sfx2::sidebar::Panel> mxPanel; - sal_Int32 GetMaxOrderIndex(sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer aPanels); - sal_Int32 GetMinOrderIndex(sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer aPanels); + sal_Int32 GetMaxOrderIndex(const sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer& rPanels); + sal_Int32 GetMinOrderIndex(const sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer& rPanels); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/sidebar/UnoDeck.cxx b/sfx2/source/sidebar/UnoDeck.cxx index 30a68cdc385c..deb4552b4cdf 100644 --- a/sfx2/source/sidebar/UnoDeck.cxx +++ b/sfx2/source/sidebar/UnoDeck.cxx @@ -247,14 +247,14 @@ void SAL_CALL SfxUnoDeck::moveDown() } } -sal_Int32 SfxUnoDeck::GetMinOrderIndex(ResourceManager::DeckContextDescriptorContainer aDecks) +sal_Int32 SfxUnoDeck::GetMinOrderIndex(const ResourceManager::DeckContextDescriptorContainer& rDecks) { SidebarController* pSidebarController = getSidebarController(); - ResourceManager::DeckContextDescriptorContainer::const_iterator iDeck = aDecks.begin(); + ResourceManager::DeckContextDescriptorContainer::const_iterator iDeck = rDecks.begin(); sal_Int32 minIndex = pSidebarController->GetResourceManager()->GetDeckDescriptor(iDeck->msId)->mnOrderIndex; - for (auto const& deck : aDecks) + for (auto const& deck : rDecks) { sal_Int32 index = pSidebarController->GetResourceManager()->GetDeckDescriptor(deck.msId)->mnOrderIndex; if(minIndex > index) @@ -263,13 +263,13 @@ sal_Int32 SfxUnoDeck::GetMinOrderIndex(ResourceManager::DeckContextDescriptorCon return minIndex; } -sal_Int32 SfxUnoDeck::GetMaxOrderIndex(ResourceManager::DeckContextDescriptorContainer aDecks) +sal_Int32 SfxUnoDeck::GetMaxOrderIndex(const ResourceManager::DeckContextDescriptorContainer& rDecks) { SidebarController* pSidebarController = getSidebarController(); - sal_Int32 maxIndex = pSidebarController->GetResourceManager()->GetDeckDescriptor(aDecks.begin()->msId)->mnOrderIndex; + sal_Int32 maxIndex = pSidebarController->GetResourceManager()->GetDeckDescriptor(rDecks.begin()->msId)->mnOrderIndex; - for (auto const& deck : aDecks) + for (auto const& deck : rDecks) { sal_Int32 index = pSidebarController->GetResourceManager()->GetDeckDescriptor(deck.msId)->mnOrderIndex; if(maxIndex < index) diff --git a/sfx2/source/sidebar/UnoPanel.cxx b/sfx2/source/sidebar/UnoPanel.cxx index d47399b85b5d..4af0b0b89264 100644 --- a/sfx2/source/sidebar/UnoPanel.cxx +++ b/sfx2/source/sidebar/UnoPanel.cxx @@ -261,13 +261,13 @@ void SAL_CALL SfxUnoPanel::moveDown() } } -sal_Int32 SfxUnoPanel::GetMinOrderIndex(ResourceManager::PanelContextDescriptorContainer aPanels) +sal_Int32 SfxUnoPanel::GetMinOrderIndex(const ResourceManager::PanelContextDescriptorContainer& rPanels) { SidebarController* pSidebarController = getSidebarController(); - sal_Int32 minIndex = pSidebarController->GetResourceManager()->GetPanelDescriptor(aPanels.begin()->msId)->mnOrderIndex; + sal_Int32 minIndex = pSidebarController->GetResourceManager()->GetPanelDescriptor(rPanels.begin()->msId)->mnOrderIndex; - for (auto const& panel : aPanels) + for (auto const& panel : rPanels) { sal_Int32 index = pSidebarController->GetResourceManager()->GetPanelDescriptor(panel.msId)->mnOrderIndex; if(minIndex > index) @@ -276,13 +276,13 @@ sal_Int32 SfxUnoPanel::GetMinOrderIndex(ResourceManager::PanelContextDescriptorC return minIndex; } -sal_Int32 SfxUnoPanel::GetMaxOrderIndex(ResourceManager::PanelContextDescriptorContainer aPanels) +sal_Int32 SfxUnoPanel::GetMaxOrderIndex(const ResourceManager::PanelContextDescriptorContainer& rPanels) { SidebarController* pSidebarController = getSidebarController(); - sal_Int32 maxIndex = pSidebarController->GetResourceManager()->GetPanelDescriptor(aPanels.begin()->msId)->mnOrderIndex; + sal_Int32 maxIndex = pSidebarController->GetResourceManager()->GetPanelDescriptor(rPanels.begin()->msId)->mnOrderIndex; - for (auto const& panel : aPanels) + for (auto const& panel : rPanels) { sal_Int32 index = pSidebarController->GetResourceManager()->GetPanelDescriptor(panel.msId)->mnOrderIndex; if(maxIndex < index)
