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/filter/html/htmlpars.cxx | |
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/filter/html/htmlpars.cxx')
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 35a60721593b..b68159a3b7ec 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -57,7 +57,7 @@ #include "rangelst.hxx" #include <config_orcus.h> - +#include <o3tl/make_unique.hxx> #if ENABLE_ORCUS #include <orcus/css_parser.hpp> #endif @@ -86,9 +86,8 @@ void ScHTMLStyles::add(const char* pElemName, size_t nElemName, const char* pCla if (itrElem == m_ElemProps.end()) { // new element - std::unique_ptr<NamePropsType> p(new NamePropsType); std::pair<ElemsType::iterator, bool> r = - m_ElemProps.insert(std::make_pair(aElem, std::move(p))); + m_ElemProps.insert(std::make_pair(aElem, o3tl::make_unique<NamePropsType>())); if (!r.second) // insertion failed. return; @@ -171,9 +170,8 @@ void ScHTMLStyles::insertProp( if (itr == rStore.end()) { // new element - std::unique_ptr<PropsType> p(new PropsType); std::pair<NamePropsType::iterator, bool> r = - rStore.insert(std::make_pair(aName, std::move(p))); + rStore.insert(std::make_pair(aName, o3tl::make_unique<PropsType>())); if (!r.second) // insertion failed. return; |