From a2fc883173d7053cefe543620982051ae40c4b03 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 23 Jun 2020 15:02:35 +0200 Subject: 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 --- basctl/source/basicide/scriptdocument.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index cedadda510cf..d557bd5f31f4 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -1228,9 +1228,7 @@ namespace basctl OUString aBaseName = _eType == E_SCRIPTS ? OUString("Module") : OUString("Dialog"); Sequence< OUString > aUsedNames( getObjectNames( _eType, _rLibName ) ); - std::set< OUString > aUsedNamesCheck; - std::copy( aUsedNames.begin(), aUsedNames.end(), - std::insert_iterator< std::set< OUString > >( aUsedNamesCheck, aUsedNamesCheck.begin() ) ); + std::set< OUString > aUsedNamesCheck( aUsedNames.begin(), aUsedNames.end() ); bool bValid = false; sal_Int32 i = 1; -- cgit