The UpcallInfo constructor should take const shared_ptr ref.
diff --git a/ndn-cpp/closure.hpp b/ndn-cpp/closure.hpp
index 81846f1..dff4bf6 100644
--- a/ndn-cpp/closure.hpp
+++ b/ndn-cpp/closure.hpp
@@ -39,11 +39,9 @@
class UpcallInfo {
public:
- UpcallInfo(Node *node, ptr_lib::shared_ptr<Interest> &interest, int matchedComps, ptr_lib::shared_ptr<Data> &data)
+ UpcallInfo(Node *node, const ptr_lib::shared_ptr<Interest> &interest, int matchedComps, const ptr_lib::shared_ptr<Data> &data)
+ : node_(node), interest_(interest), data_(data)
{
- node_ = node;
- interest_ = interest;
- data_ = data;
}
Node *getNode() { return node_; }