Improve and simplify code with modern C++ features
Change-Id: I83bf5513c2a1f90ba5a59e93c473306864b27d94
diff --git a/tests/daemon/face/generic-link-service.t.cpp b/tests/daemon/face/generic-link-service.t.cpp
index dfb048c..2192622 100644
--- a/tests/daemon/face/generic-link-service.t.cpp
+++ b/tests/daemon/face/generic-link-service.t.cpp
@@ -57,9 +57,9 @@
: service(nullptr)
, transport(nullptr)
{
- this->initialize(GenericLinkService::Options());
// By default, GenericLinkService is created with default options.
// Test cases may invoke .initialize with alternate options.
+ this->initialize({});
}
void
@@ -67,14 +67,14 @@
ssize_t mtu = MTU_UNLIMITED,
ssize_t sendQueueCapacity = QUEUE_UNSUPPORTED)
{
- face.reset(new Face(make_unique<GenericLinkService>(options),
- make_unique<DummyTransport>("dummy://",
- "dummy://",
- ndn::nfd::FACE_SCOPE_NON_LOCAL,
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- ndn::nfd::LINK_TYPE_POINT_TO_POINT,
- mtu,
- sendQueueCapacity)));
+ face = make_unique<Face>(make_unique<GenericLinkService>(options),
+ make_unique<DummyTransport>("dummy://",
+ "dummy://",
+ ndn::nfd::FACE_SCOPE_NON_LOCAL,
+ ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+ ndn::nfd::LINK_TYPE_POINT_TO_POINT,
+ mtu,
+ sendQueueCapacity));
service = static_cast<GenericLinkService*>(face->getLinkService());
transport = static_cast<DummyTransport*>(face->getTransport());
@@ -347,7 +347,7 @@
lp::Packet packet(interest->wireEncode());
// fragment the packet
- LpFragmenter fragmenter;
+ LpFragmenter fragmenter({});
size_t mtu = 100;
bool isOk = false;
std::vector<lp::Packet> frags;