summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoanna Hulboj <joanna.hulboj@isode.com>2017-04-28 13:52:47 (GMT)
committerKevin Smith <kevin.smith@isode.com>2017-07-07 16:23:08 (GMT)
commitf68d574ff04162e98e16a636c66ab6de5960e875 (patch)
tree0248d9450a8bb6aa6731067d9f921791d9d4deaa /Swiften/Disco
parentd89b27b8796f89c847c280dacfb1b09fd6cb6731 (diff)
downloadswift-f68d574ff04162e98e16a636c66ab6de5960e875.zip
swift-f68d574ff04162e98e16a636c66ab6de5960e875.tar.bz2
Make std:: make_unique available in gcc with c++11
Test-Information: Unit tests pass OK on Windows 10 and CentOS 7.3. Change-Id: I33c9eb6b3e6409727350a44e6d5c88c5e8907275
Diffstat (limited to 'Swiften/Disco')
-rw-r--r--Swiften/Disco/UnitTest/CapsManagerTest.cpp6
-rw-r--r--Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Disco/UnitTest/CapsManagerTest.cpp b/Swiften/Disco/UnitTest/CapsManagerTest.cpp
index 153e821..5f1aaf4 100644
--- a/Swiften/Disco/UnitTest/CapsManagerTest.cpp
+++ b/Swiften/Disco/UnitTest/CapsManagerTest.cpp
@@ -47,9 +47,9 @@ class CapsManagerTest : public CppUnit::TestFixture {
public:
void setUp() {
crypto = std::shared_ptr<CryptoProvider>(PlatformCryptoProvider::create());
- stanzaChannel = std::unique_ptr<DummyStanzaChannel>(new DummyStanzaChannel());
- iqRouter = std::unique_ptr<IQRouter>(new IQRouter(stanzaChannel.get()));
- storage = std::unique_ptr<CapsMemoryStorage>(new CapsMemoryStorage());
+ stanzaChannel = std::make_unique<DummyStanzaChannel>();
+ iqRouter = std::make_unique<IQRouter>(stanzaChannel.get());
+ storage = std::make_unique<CapsMemoryStorage>();
user1 = JID("user1@bar.com/bla");
discoInfo1 = std::make_shared<DiscoInfo>();
discoInfo1->addFeature("http://swift.im/feature1");
diff --git a/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp b/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp
index 8c59741..6548485 100644
--- a/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp
+++ b/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp
@@ -37,8 +37,8 @@ class EntityCapsManagerTest : public CppUnit::TestFixture {
void setUp() {
crypto = std::shared_ptr<CryptoProvider>(PlatformCryptoProvider::create());
- stanzaChannel = std::unique_ptr<DummyStanzaChannel>(new DummyStanzaChannel());
- capsProvider = std::unique_ptr<DummyCapsProvider>(new DummyCapsProvider());
+ stanzaChannel = std::make_unique<DummyStanzaChannel>();
+ capsProvider = std::make_unique<DummyCapsProvider>();
user1 = JID("user1@bar.com/bla");
discoInfo1 = std::make_shared<DiscoInfo>();