summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-31 16:34:30 +0200
committerNoel Grandin <noel@peralex.com>2016-09-01 11:05:21 +0200
commit47a72493a9106a4783bfcb7c34a8cde579a2cba0 (patch)
tree9864001823aea81fdecc84f2080179e6c71d616f /dbaccess
parentf651ea26eaa6b2a5b3dd1892397fbb1fac157d1d (diff)
std::list<sal_Int32> -> std::vector
Change-Id: Ie1d062bd4dabf7ca7de08193597225462447b076
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx14
-rw-r--r--dbaccess/source/core/api/CacheSet.hxx5
2 files changed, 10 insertions, 9 deletions
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 5bb75ba892ae..6922b00fde41 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -196,7 +196,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
,const connectivity::OSQLTable& _xTable
,OUStringBuffer& _sCondition
,OUStringBuffer& _sParameter
- ,::std::list< sal_Int32>& _rOrgValues)
+ ,::std::vector< sal_Int32>& _rOrgValues)
{
// use keys and indexes for exact positioning
// first the keys
@@ -285,7 +285,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
// list all columns that should be set
OUStringBuffer aCondition;
- ::std::list< sal_Int32> aOrgValues;
+ ::std::vector< sal_Int32> aOrgValues;
fillParameters(_rInsertRow,_xTable,aCondition,aSql,aOrgValues);
aSql[aSql.getLength() - 1] = ' ';
if ( !aCondition.isEmpty() )
@@ -311,8 +311,8 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
++i;
}
}
- ::std::list< sal_Int32>::const_iterator aOrgValueEnd = aOrgValues.end();
- for(::std::list< sal_Int32>::const_iterator aOrgValue = aOrgValues.begin(); aOrgValue != aOrgValueEnd;++aOrgValue,++i)
+ auto aOrgValueEnd = aOrgValues.cend();
+ for(auto aOrgValue = aOrgValues.cbegin(); aOrgValue != aOrgValueEnd;++aOrgValue,++i)
{
setParameter(i,xParameter,(_rOriginalRow->get())[*aOrgValue],m_xSetMetaData->getColumnType(i),m_xSetMetaData->getScale(i));
}
@@ -354,7 +354,7 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti
}
OUStringBuffer aColumnName;
- ::std::list< sal_Int32> aOrgValues;
+ ::std::vector< sal_Int32> aOrgValues;
fillParameters(_rDeleteRow,_xTable,aSql,aColumnName,aOrgValues);
aSql.setLength(aSql.getLength()-5);
@@ -363,8 +363,8 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti
Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(aSql.makeStringAndClear()));
Reference< XParameters > xParameter(xPrep,UNO_QUERY);
sal_Int32 i = 1;
- ::std::list< sal_Int32>::const_iterator aOrgValueEnd = aOrgValues.end();
- for(::std::list< sal_Int32>::const_iterator j = aOrgValues.begin(); j != aOrgValueEnd;++j,++i)
+ auto aOrgValueEnd = aOrgValues.cend();
+ for(auto j = aOrgValues.cbegin(); j != aOrgValueEnd; ++j,++i)
{
setParameter(i,xParameter,(_rDeleteRow->get())[*j],m_xSetMetaData->getColumnType(i),m_xSetMetaData->getScale(i));
}
diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx
index f543840ff615..ca4aea9e6261 100644
--- a/dbaccess/source/core/api/CacheSet.hxx
+++ b/dbaccess/source/core/api/CacheSet.hxx
@@ -31,7 +31,8 @@
#include "RowSetRow.hxx"
#include <cppuhelper/implbase.hxx>
-#include <list>
+#include <vector>
+
namespace com{ namespace sun { namespace star{namespace sdbc{ class XParameters; } } } }
namespace dbaccess
@@ -67,7 +68,7 @@ namespace dbaccess
,const connectivity::OSQLTable& _xTable
,OUStringBuffer& _sCondition
,OUStringBuffer& _sParameter
- ,::std::list< sal_Int32>& _rOrgValues);
+ ,::std::vector< sal_Int32>& _rOrgValues);
void fillTableName(const css::uno::Reference< css::beans::XPropertySet>& _xTable) throw(css::sdbc::SQLException, css::uno::RuntimeException);
OUString getIdentifierQuoteString() const;