interest: fix initialization of `m_interestLifetime`
Reported-by: Tyler Liu <tylerliu@g.ucla.edu>
Change-Id: I4d09dc2e64ee7b4d7274069340d26c188a76d7e7
diff --git a/ndn-cxx/interest.hpp b/ndn-cxx/interest.hpp
index 92bb582..6b825f9 100644
--- a/ndn-cxx/interest.hpp
+++ b/ndn-cxx/interest.hpp
@@ -107,7 +107,7 @@
* using `make_shared`. Otherwise, `shared_from_this()` will trigger undefined behavior.
*/
explicit
- Interest(const Name& name = Name(), time::milliseconds lifetime = DEFAULT_INTEREST_LIFETIME);
+ Interest(const Name& name = {}, time::milliseconds lifetime = DEFAULT_INTEREST_LIFETIME);
/** @brief Construct an Interest by decoding from @p wire.
*
@@ -473,7 +473,7 @@
Name m_name;
std::vector<Name> m_forwardingHint;
mutable optional<Nonce> m_nonce;
- time::milliseconds m_interestLifetime;
+ time::milliseconds m_interestLifetime = DEFAULT_INTEREST_LIFETIME;
optional<uint8_t> m_hopLimit;
bool m_canBePrefix = false;
bool m_mustBeFresh = false;