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 @@ ...@@ -390,7 +390,6 @@
#include <i18nlangtag/languagetag.hxx> #include <i18nlangtag/languagetag.hxx>
#include <o3tl/cow_wrapper.hxx> #include <o3tl/cow_wrapper.hxx>
#include <o3tl/enumarray.hxx> #include <o3tl/enumarray.hxx>
#include <o3tl/make_unique.hxx>
#include <o3tl/sorted_vector.hxx> #include <o3tl/sorted_vector.hxx>
#include <o3tl/strong_int.hxx> #include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx> #include <o3tl/typed_flags_set.hxx>
......
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
#include <i18nlangtag/lang.h> #include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx> #include <i18nlangtag/languagetag.hxx>
#include <o3tl/cow_wrapper.hxx> #include <o3tl/cow_wrapper.hxx>
#include <o3tl/make_unique.hxx>
#include <sbobjmod.hxx> #include <sbobjmod.hxx>
#include <sbxbase.hxx> #include <sbxbase.hxx>
#include <svl/SfxBroadcaster.hxx> #include <svl/SfxBroadcaster.hxx>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <o3tl/make_unique.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <memory> #include <memory>
#include <o3tl/make_unique.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include "resourceprovider.hxx" #include "resourceprovider.hxx"
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <sfx2/dllapi.h> #include <sfx2/dllapi.h>
#include <sal/types.h> #include <sal/types.h>
#include <o3tl/make_unique.hxx>
#include <o3tl/typed_flags_set.hxx> #include <o3tl/typed_flags_set.hxx>
#include <vcl/window.hxx> #include <vcl/window.hxx>
#include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XFrame.hpp>
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <svx/svxdllapi.h> #include <svx/svxdllapi.h>
#include <editeng/flditem.hxx> #include <editeng/flditem.hxx>
#include <o3tl/make_unique.hxx>
namespace svx { namespace svx {
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <cppunit/TestFixture.h> #include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <o3tl/make_unique.hxx>
#include <o3tl/sorted_vector.hxx> #include <o3tl/sorted_vector.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
...@@ -256,10 +255,10 @@ public: ...@@ -256,10 +255,10 @@ public:
{ {
o3tl::sorted_vector<std::unique_ptr<OUString>, o3tl::less_uniqueptr_to<OUString>> aVec; 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_c = aVec.insert(std::make_unique<OUString>("c")).first->get();
auto str_b1 = aVec.insert(o3tl::make_unique<OUString>("b")).first->get(); auto str_b1 = aVec.insert(std::make_unique<OUString>("b")).first->get();
CPPUNIT_ASSERT(!aVec.insert(o3tl::make_unique<OUString>("b")).second); CPPUNIT_ASSERT(!aVec.insert(std::make_unique<OUString>("b")).second);
aVec.insert(o3tl::make_unique<OUString>("a")); aVec.insert(std::make_unique<OUString>("a"));
CPPUNIT_ASSERT_EQUAL( static_cast<size_t>(3), aVec.size() ); CPPUNIT_ASSERT_EQUAL( static_cast<size_t>(3), aVec.size() );
CPPUNIT_ASSERT_EQUAL( OUString("a"), *aVec[0] ); CPPUNIT_ASSERT_EQUAL( OUString("a"), *aVec[0] );
CPPUNIT_ASSERT_EQUAL( OUString("b"), *aVec[1] ); CPPUNIT_ASSERT_EQUAL( OUString("b"), *aVec[1] );
...@@ -279,10 +278,10 @@ public: ...@@ -279,10 +278,10 @@ public:
o3tl::sorted_vector<std::unique_ptr<OUString>, o3tl::less_uniqueptr_to<OUString>, o3tl::sorted_vector<std::unique_ptr<OUString>, o3tl::less_uniqueptr_to<OUString>,
o3tl::find_partialorder_ptrequals> aVec; o3tl::find_partialorder_ptrequals> aVec;
auto str_c = aVec.insert(o3tl::make_unique<OUString>("c")).first->get(); auto str_c = aVec.insert(std::make_unique<OUString>("c")).first->get();
auto str_b1 = aVec.insert(o3tl::make_unique<OUString>("b")).first->get(); auto str_b1 = aVec.insert(std::make_unique<OUString>("b")).first->get();
auto str_b2 = aVec.insert(o3tl::make_unique<OUString>("b")).first->get(); auto str_b2 = aVec.insert(std::make_unique<OUString>("b")).first->get();
aVec.insert(o3tl::make_unique<OUString>("a")); aVec.insert(std::make_unique<OUString>("a"));
CPPUNIT_ASSERT_EQUAL( static_cast<size_t>(4), aVec.size() ); CPPUNIT_ASSERT_EQUAL( static_cast<size_t>(4), aVec.size() );
CPPUNIT_ASSERT_EQUAL( OUString("a"), *aVec[0] ); CPPUNIT_ASSERT_EQUAL( OUString("a"), *aVec[0] );
CPPUNIT_ASSERT_EQUAL( OUString("b"), *aVec[1] ); CPPUNIT_ASSERT_EQUAL( OUString("b"), *aVec[1] );
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <limits> #include <limits>
#include <chrono> #include <chrono>
#include <random> #include <random>
#include <o3tl/make_unique.hxx>
#include <unotools/resmgr.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