Kaydet (Commit) 5082a2b3 authored tarafından Gabor Kelemen's avatar Gabor Kelemen Kaydeden (comit) Miklos Vajna

o3tl::make_unique -> std::make_unique in include/ & o3tl/

Also the last few remaining occurrences of the header

Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one

Change-Id: I18f435270057f2d09e21d6ea262532cbcc974598
Reviewed-on: https://gerrit.libreoffice.org/67843
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst cf3229db
......@@ -390,7 +390,6 @@
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/enumarray.hxx>
#include <o3tl/make_unique.hxx>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
......
......@@ -69,7 +69,6 @@
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/make_unique.hxx>
#include <sbobjmod.hxx>
#include <sbxbase.hxx>
#include <svl/SfxBroadcaster.hxx>
......
......@@ -19,7 +19,6 @@
#include <sal/config.h>
#include <o3tl/make_unique.hxx>
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
#include <osl/mutex.hxx>
......
......@@ -21,7 +21,6 @@
#include <memory>
#include <o3tl/make_unique.hxx>
#include <rtl/ustrbuf.hxx>
#include "resourceprovider.hxx"
#include <osl/mutex.hxx>
......
......@@ -24,7 +24,6 @@
#include <sfx2/dllapi.h>
#include <sal/types.h>
#include <o3tl/make_unique.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <vcl/window.hxx>
#include <com/sun/star/frame/XFrame.hpp>
......
......@@ -14,7 +14,6 @@
#include <sal/config.h>
#include <svx/svxdllapi.h>
#include <editeng/flditem.hxx>
#include <o3tl/make_unique.hxx>
namespace svx {
......
......@@ -12,7 +12,6 @@
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <o3tl/make_unique.hxx>
#include <o3tl/sorted_vector.hxx>
#include <rtl/ustring.hxx>
......@@ -256,10 +255,10 @@ public:
{
o3tl::sorted_vector<std::unique_ptr<OUString>, o3tl::less_uniqueptr_to<OUString>> aVec;
auto str_c = aVec.insert(o3tl::make_unique<OUString>("c")).first->get();
auto str_b1 = aVec.insert(o3tl::make_unique<OUString>("b")).first->get();
CPPUNIT_ASSERT(!aVec.insert(o3tl::make_unique<OUString>("b")).second);
aVec.insert(o3tl::make_unique<OUString>("a"));
auto str_c = aVec.insert(std::make_unique<OUString>("c")).first->get();
auto str_b1 = aVec.insert(std::make_unique<OUString>("b")).first->get();
CPPUNIT_ASSERT(!aVec.insert(std::make_unique<OUString>("b")).second);
aVec.insert(std::make_unique<OUString>("a"));
CPPUNIT_ASSERT_EQUAL( static_cast<size_t>(3), aVec.size() );
CPPUNIT_ASSERT_EQUAL( OUString("a"), *aVec[0] );
CPPUNIT_ASSERT_EQUAL( OUString("b"), *aVec[1] );
......@@ -279,10 +278,10 @@ public:
o3tl::sorted_vector<std::unique_ptr<OUString>, o3tl::less_uniqueptr_to<OUString>,
o3tl::find_partialorder_ptrequals> aVec;
auto str_c = aVec.insert(o3tl::make_unique<OUString>("c")).first->get();
auto str_b1 = aVec.insert(o3tl::make_unique<OUString>("b")).first->get();
auto str_b2 = aVec.insert(o3tl::make_unique<OUString>("b")).first->get();
aVec.insert(o3tl::make_unique<OUString>("a"));
auto str_c = aVec.insert(std::make_unique<OUString>("c")).first->get();
auto str_b1 = aVec.insert(std::make_unique<OUString>("b")).first->get();
auto str_b2 = aVec.insert(std::make_unique<OUString>("b")).first->get();
aVec.insert(std::make_unique<OUString>("a"));
CPPUNIT_ASSERT_EQUAL( static_cast<size_t>(4), aVec.size() );
CPPUNIT_ASSERT_EQUAL( OUString("a"), *aVec[0] );
CPPUNIT_ASSERT_EQUAL( OUString("b"), *aVec[1] );
......
......@@ -35,7 +35,6 @@
#include <limits>
#include <chrono>
#include <random>
#include <o3tl/make_unique.hxx>
#include <unotools/resmgr.hxx>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment