summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado/AStatement.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/ado/AStatement.cxx')
-rw-r--r--connectivity/source/drivers/ado/AStatement.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx
index f2ed68a78070..01fea934cd19 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -34,6 +34,7 @@
#undef max
#include <algorithm>
+#include <numeric>
using namespace ::comphelper;
@@ -348,10 +349,9 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
reset();
- OUString aBatchSql;
- sal_Int32 nLen = 0;
- for(std::vector< OUString>::const_iterator i=m_aBatchVector.begin();i != m_aBatchVector.end();++i,++nLen)
- aBatchSql = aBatchSql + *i + ";";
+ OUString aBatchSql = std::accumulate(m_aBatchVector.begin(), m_aBatchVector.end(), OUString(),
+ [](const OUString& rRes, const OUString& rStr) { return rRes + rStr + ";"; });
+ sal_Int32 nLen = m_aBatchVector.size();
if ( m_RecordSet.IsValid() )