diff options
author | Andrzej Hunt <andrzej@ahunt.org> | 2015-11-21 08:14:05 -0800 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-20 01:25:51 -0400 |
commit | 5e24489d2f1016b5cf83cacb1f4a85d3777c4cc4 (patch) | |
tree | e75007673501ef74f52f9fc4f58fc3588a4c0b0e /dbaccess | |
parent | cfe9fcbedd38e62d16c0a1bfff90c040efd6c1d1 (diff) |
new loplugin rangedforcopy - use reference in range based for
Inspired by 6e6ae9803796b120e95f6e89575e03c5fd0ed3c2
Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01
Reviewed-on: https://gerrit.libreoffice.org/20190
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 9d0b06e9f728d01a2d2908e1e56cb4220cd414d5)
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/queryorder.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/JoinTableView.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryTableView.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindowTitle.cxx | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index 9d7ff34d15c9..13fb716b4296 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -138,8 +138,8 @@ void DlgOrderCrit::dispose() m_pLB_ORDERVALUE2.clear(); m_pLB_ORDERFIELD3.clear(); m_pLB_ORDERVALUE3.clear(); - for (auto a : m_aColumnList) a.clear(); - for (auto a : m_aValueList) a.clear(); + for (auto& a : m_aColumnList) a.clear(); + for (auto& a : m_aValueList) a.clear(); ModalDialog::dispose(); } diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 2ab09ffdaab0..dc47975624db 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -947,7 +947,7 @@ void OJoinTableView::InvalidateConnections() void OJoinTableView::DrawConnections(vcl::RenderContext& rRenderContext, const Rectangle& rRect) { // draw Joins - for(auto connection : m_vTableConnection) + for(const auto& connection : m_vTableConnection) connection->Draw(rRenderContext, rRect); // finally redraw the selected one above all others if (GetSelectedConn()) diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 8220076e032b..710efd3486d8 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -897,7 +897,7 @@ bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc // the Connections auto rTableCon = pUndoAction->GetTabConnList(); - for(auto conn : rTableCon) + for(const auto& conn : rTableCon) addConnection(conn); // add all connections from the undo action rTableCon.clear(); @@ -939,7 +939,7 @@ void OQueryTableView::InsertField(const OTableFieldDescRef& rInfo) bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) const { - for(auto conn : getTableConnections()) + for(const auto& conn : getTableConnections()) { OQueryTableConnection* pTemp = static_cast<OQueryTableConnection*>(conn.get()); if (pTemp->IsVisited() && diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index 9db6d52b979c..8da722265150 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -142,7 +142,7 @@ void OTableWindowTitle::MouseButtonDown( const MouseEvent& rEvt ) OJoinTableView* pView = static_cast<OJoinTableView*>(m_pTabWin->getTableView()); OSL_ENSURE(pView,"No OJoinTableView!"); - for (auto conn : pView->getTableConnections()) + for (auto& conn : pView->getTableConnections()) conn->RecalcLines(); pView->InvalidateConnections(); |