summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-06-23 15:02:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-06-24 08:43:55 +0200
commita2fc883173d7053cefe543620982051ae40c4b03 (patch)
treedac1b760925c8151dfd8a9cbe3a8735b68ab9f79 /connectivity/source/commontools
parent010713e65ccade7b682c219707c8db3d864145c1 (diff)
use more std::container::insert instead of std::copy
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r--connectivity/source/commontools/dbtools.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 419cd26e7c07..7f2e418601e9 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1388,12 +1388,7 @@ sal_Int32 getSearchColumnFlag( const Reference< XConnection>& _rxConn,sal_Int32
OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString& _rBaseName, bool _bStartWithNumber )
{
- std::set< OUString > aUsedNames;
- std::copy(
- _rNames.begin(),
- _rNames.end(),
- std::insert_iterator< std::set< OUString > >( aUsedNames, aUsedNames.end() )
- );
+ std::set< OUString > aUsedNames(_rNames.begin(), _rNames.end());
OUString sName( _rBaseName );
sal_Int32 nPos = 1;