summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej@ahunt.org>2015-11-21 08:14:05 -0800
committerStephan Bergmann <sbergman@redhat.com>2016-01-05 11:06:52 +0000
commit9d0b06e9f728d01a2d2908e1e56cb4220cd414d5 (patch)
tree072f69061281445cf3591f55592b87402dcd14d9 /dbaccess
parentd202f851717bb5a8fe5fed98f747a1fd164d3225 (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>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/queryorder.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx2
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 70379a872a0f..bfff9a8874a0 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -950,7 +950,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 fb53cd47acb2..40f43aae2b7b 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -893,7 +893,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();
@@ -935,7 +935,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();