face: change Transport static properties initialization
Transport constructor now initializes static properties to invalid values.
Subclass constructor must explicitly set every static property.
refs #3259
Change-Id: I7ac3819694e0772c33a8a5d573e260f0eb944bff
diff --git a/daemon/face/transport.cpp b/daemon/face/transport.cpp
index d6008f7..0c4f4ee 100644
--- a/daemon/face/transport.cpp
+++ b/daemon/face/transport.cpp
@@ -60,15 +60,13 @@
Transport::Transport()
: m_face(nullptr)
, m_service(nullptr)
- , m_scope(ndn::nfd::FACE_SCOPE_NON_LOCAL)
- , m_persistency(ndn::nfd::FACE_PERSISTENCY_PERSISTENT)
- , m_linkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT)
- , m_mtu(MTU_UNLIMITED)
+ , m_scope(ndn::nfd::FACE_SCOPE_NONE)
+ , m_persistency(ndn::nfd::FACE_PERSISTENCY_NONE)
+ , m_linkType(ndn::nfd::LINK_TYPE_NONE)
+ , m_mtu(MTU_INVALID)
, m_state(TransportState::UP)
, m_counters(nullptr)
{
- // warning: Subclass constructor must explicitly initialize all static properties
- // using setters, and should not rely on the defaults here.
}
Transport::~Transport()