summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 12:00:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 13:15:40 +0200
commit48b200a0a2aa70a7dfc0aad8a4964690ae11d42e (patch)
treec23ca5f8d827ba2e99783d80fac21073dd242147 /svl
parent65b756f6058697ccb787506c3cc32e1e818bcc37 (diff)
clang-tidy modernize-use-emplace in svgio..svtools
Change-Id: I4f3b0762e197d5397e723aba1dc43e3c857be145 Reviewed-on: https://gerrit.libreoffice.org/42193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/filepicker/pickerhistory.cxx2
-rw-r--r--svl/source/items/IndexedStyleSheets.cxx4
-rw-r--r--svl/source/items/itemprop.cxx2
-rw-r--r--svl/source/misc/ownlist.cxx2
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx2
-rw-r--r--svl/source/undo/undo.cxx4
6 files changed, 8 insertions, 8 deletions
diff --git a/svl/source/filepicker/pickerhistory.cxx b/svl/source/filepicker/pickerhistory.cxx
index c4c4b03008e9..525ac66940a8 100644
--- a/svl/source/filepicker/pickerhistory.cxx
+++ b/svl/source/filepicker/pickerhistory.cxx
@@ -56,7 +56,7 @@ namespace svt
_rHistory.end());
// then push_back the picker
- _rHistory.push_back( css::uno::WeakReference< XInterface >( _rxPicker ) );
+ _rHistory.emplace_back( _rxPicker );
}
}
diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx
index b327315b8a2c..b74cffb2a2c9 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -49,7 +49,7 @@ namespace svl {
IndexedStyleSheets::IndexedStyleSheets()
{
for (size_t i = 0; i < NUMBER_OF_FAMILIES; i++) {
- mStyleSheetPositionsByFamily.push_back(std::vector<unsigned>());
+ mStyleSheetPositionsByFamily.emplace_back();
}
;}
@@ -69,7 +69,7 @@ IndexedStyleSheets::Reindex()
mPositionsByName.clear();
mStyleSheetPositionsByFamily.clear();
for (size_t i = 0; i < NUMBER_OF_FAMILIES; i++) {
- mStyleSheetPositionsByFamily.push_back(std::vector<unsigned>());
+ mStyleSheetPositionsByFamily.emplace_back();
}
unsigned i = 0;
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 46dd51b8084d..276ccc797497 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -157,7 +157,7 @@ PropertyEntryVector_t SfxItemPropertyMap::getPropertyEntries() const
while( aIt != m_pImpl->end() )
{
const SfxItemPropertySimpleEntry* pEntry = &(*aIt).second;
- aRet.push_back( SfxItemPropertyNamedEntry( (*aIt).first, * pEntry ) );
+ aRet.emplace_back( (*aIt).first, * pEntry );
++aIt;
}
return aRet;
diff --git a/svl/source/misc/ownlist.cxx b/svl/source/misc/ownlist.cxx
index 18f52af7e99f..7d2b926ebe12 100644
--- a/svl/source/misc/ownlist.cxx
+++ b/svl/source/misc/ownlist.cxx
@@ -34,7 +34,7 @@ void SvCommandList::Append
const OUString & rArg /* The command's argument */
)
{
- aCommandList.push_back( SvCommand( rCommand, rArg ) );
+ aCommandList.emplace_back( rCommand, rArg );
}
void SvCommandList::FillFromSequence( const css::uno::Sequence < css::beans::PropertyValue >& aCommandSequence )
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 355594e71c2f..f310b6d8b00a 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -214,7 +214,7 @@ PassMap StorageItem::getInfo()
PassMap::iterator aIter = aResult.find( aUrl );
if( aIter != aResult.end() )
- aIter->second.push_back( NamePassRecord( aName, aEPasswd ) );
+ aIter->second.emplace_back( aName, aEPasswd );
else
{
NamePassRecord aNewRecord( aName, aEPasswd );
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index ce8434180279..087f65986568 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -356,12 +356,12 @@ namespace svl { namespace undo { namespace impl
*/
void scheduleNotification( UndoListenerVoidMethod i_notificationMethod )
{
- m_notifiers.push_back( NotifyUndoListener( i_notificationMethod ) );
+ m_notifiers.emplace_back( i_notificationMethod );
}
void scheduleNotification( UndoListenerStringMethod i_notificationMethod, const OUString& i_actionComment )
{
- m_notifiers.push_back( NotifyUndoListener( i_notificationMethod, i_actionComment ) );
+ m_notifiers.emplace_back( i_notificationMethod, i_actionComment );
}
private: