Use make_unique where appropriate
Change-Id: I30c9f0fb2033a810df73a1c9147fcf09d610f763
Refs: #3093
diff --git a/tests/daemon/fw/topology-tester.hpp b/tests/daemon/fw/topology-tester.hpp
index 16a1173..406c6b1 100644
--- a/tests/daemon/fw/topology-tester.hpp
+++ b/tests/daemon/fw/topology-tester.hpp
@@ -247,7 +247,7 @@
addForwarder()
{
size_t i = m_forwarders.size();
- m_forwarders.push_back(std::move(unique_ptr<Forwarder>(new Forwarder())));
+ m_forwarders.push_back(make_unique<Forwarder>());
return i;
}
diff --git a/tests/daemon/table/cs-policy-lru.t.cpp b/tests/daemon/table/cs-policy-lru.t.cpp
index a690f33..02ce3c0 100644
--- a/tests/daemon/table/cs-policy-lru.t.cpp
+++ b/tests/daemon/table/cs-policy-lru.t.cpp
@@ -41,7 +41,7 @@
BOOST_FIXTURE_TEST_CASE(EvictOneLRU, UnitTestTimeFixture)
{
Cs cs(3);
- cs.setPolicy(unique_ptr<Policy>(new LruPolicy()));
+ cs.setPolicy(make_unique<LruPolicy>());
cs.insert(*makeData("ndn:/A"));
cs.insert(*makeData("ndn:/B"));
diff --git a/tests/daemon/table/cs-policy-priority-fifo.t.cpp b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
index e88f8d5..8fd1746 100644
--- a/tests/daemon/table/cs-policy-priority-fifo.t.cpp
+++ b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
@@ -41,7 +41,7 @@
BOOST_FIXTURE_TEST_CASE(EvictOne, UnitTestTimeFixture)
{
Cs cs(3);
- cs.setPolicy(unique_ptr<Policy>(new PriorityFifoPolicy()));
+ cs.setPolicy(make_unique<PriorityFifoPolicy>());
shared_ptr<Data> dataA = makeData("ndn:/A");
dataA->setFreshnessPeriod(time::milliseconds(99999));
@@ -94,7 +94,7 @@
BOOST_FIXTURE_TEST_CASE(Refresh, UnitTestTimeFixture)
{
Cs cs(3);
- cs.setPolicy(unique_ptr<Policy>(new PriorityFifoPolicy()));
+ cs.setPolicy(make_unique<PriorityFifoPolicy>());
shared_ptr<Data> dataA = makeData("ndn:/A");
dataA->setFreshnessPeriod(time::milliseconds(99999));