summaryrefslogtreecommitdiff
path: root/svl/source/undo
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-10 14:54:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-11 14:50:11 +0100
commitccf986a77a4b218964033e70601ae220eb2c9b13 (patch)
tree08dc4cfd477a6723e8e389046fef9af67ca753a9 /svl/source/undo
parent9d6b6fc96718389d7bf5f84a9e00fc5bb275c265 (diff)
loplugin:useuniqueptr in svl
Change-Id: I2fdb63517349474d90cb17ad2bd667f30840e83d Reviewed-on: https://gerrit.libreoffice.org/47727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source/undo')
-rw-r--r--svl/source/undo/undo.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 8fe198ce51f6..e0974e4e661f 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -347,7 +347,7 @@ namespace svl { namespace undo { namespace impl
{
// remember
if ( i_action )
- m_aUndoActionsCleanup.push_back( i_action );
+ m_aUndoActionsCleanup.emplace_back( i_action );
}
/** schedules the given SfxUndoListener method to be called for all registered listeners.
@@ -368,7 +368,7 @@ namespace svl { namespace undo { namespace impl
private:
SfxUndoManager_Data& m_rManagerData;
::osl::ResettableMutexGuard m_aGuard;
- ::std::vector< SfxUndoAction* > m_aUndoActionsCleanup;
+ ::std::vector< std::unique_ptr<SfxUndoAction> > m_aUndoActionsCleanup;
::std::vector< NotifyUndoListener > m_notifiers;
};
@@ -381,8 +381,6 @@ namespace svl { namespace undo { namespace impl
m_aGuard.clear();
// delete all actions
- for (auto const& undoAction : m_aUndoActionsCleanup)
- delete undoAction;
m_aUndoActionsCleanup.clear();
// handle scheduled notification