diff options
author | Sheikha AL-Hinai <sheikha443@gmail.com> | 2015-12-28 13:56:23 +0400 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-01-05 11:47:50 +0000 |
commit | d75b9fd582f0aa83bd2fc99028b3f83eb7171d61 (patch) | |
tree | ec1f2a307f773b18e0bf17a281a001fb0aa43bbf /sc/source/ui/undo | |
parent | f961fef03906fc059a4a0c008799f68fc22727c1 (diff) |
tdf#94205: Use o3tl::make_unique insted of new+std::move.
Change-Id: I9ff14760479d2ac882546e2e5b74ab750ba2fa4b
Reviewed-on: https://gerrit.libreoffice.org/20984
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r-- | sc/source/ui/undo/undorangename.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx index f3878487f050..eb42eb442121 100644 --- a/sc/source/ui/undo/undorangename.cxx +++ b/sc/source/ui/undo/undorangename.cxx @@ -17,7 +17,7 @@ #include <memory> #include <utility> - +#include <o3tl/make_unique.hxx> using ::std::unique_ptr; ScUndoAllRangeNames::ScUndoAllRangeNames( @@ -29,14 +29,12 @@ ScUndoAllRangeNames::ScUndoAllRangeNames( std::map<OUString, ScRangeName*>::const_iterator itr, itrEnd; for (itr = rOldNames.begin(), itrEnd = rOldNames.end(); itr != itrEnd; ++itr) { - unique_ptr<ScRangeName> p(new ScRangeName(*itr->second)); - m_OldNames.insert(std::make_pair(itr->first, std::move(p))); + m_OldNames.insert(std::make_pair(itr->first,o3tl::make_unique<ScRangeName>(*itr->second))); } for (auto const& it : rNewNames) { - unique_ptr<ScRangeName> p(new ScRangeName(*it.second)); - m_NewNames.insert(std::make_pair(it.first, std::move(p))); + m_NewNames.insert(std::make_pair(it.first, o3tl::make_unique<ScRangeName>(*it.second))); } } |