Kaydet (Commit) 932c9065 authored tarafından Julien Nabet's avatar Julien Nabet

Use for-range loops in mysqlc

Change-Id: I3ff3fa5dca6b6b9060b0b38d875e1b7dec1f8245
Reviewed-on: https://gerrit.libreoffice.org/52127Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 4887640b
......@@ -488,8 +488,9 @@ void OConnection::disposing()
// we noticed that we should be destroyed in near future so we have to dispose our statements
MutexGuard aGuard(m_aMutex);
for (OWeakRefArray::iterator i = m_aStatements.begin(); i != m_aStatements.end() ; ++i) {
Reference< XComponent > xComp(i->get(), UNO_QUERY);
for (auto const& statement : m_aStatements)
{
Reference< XComponent > xComp(statement.get(), UNO_QUERY);
if (xComp.is()) {
xComp->dispose();
}
......
......@@ -57,9 +57,9 @@ void MysqlCDriver::disposing()
::osl::MutexGuard aGuard(m_aMutex);
// when driver will be destroyed so all our connections have to be destroyed as well
for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
for (auto const& connection : m_xConnections)
{
Reference< XComponent > xComp(i->get(), UNO_QUERY);
Reference< XComponent > xComp(connection.get(), UNO_QUERY);
if (xComp.is()) {
xComp->dispose();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment