Added setVector in common.hpp
diff --git a/ndn-cpp/Interest.cpp b/ndn-cpp/Interest.cpp
index 5ddbbab..2b39b49 100644
--- a/ndn-cpp/Interest.cpp
+++ b/ndn-cpp/Interest.cpp
@@ -4,6 +4,7 @@
*/
#include <stdexcept>
+#include "common.hpp"
#include "Interest.hpp"
using namespace std;
@@ -48,10 +49,7 @@
answerOriginKind_ = interestStruct.answerOriginKind;
scope_ = interestStruct.scope;
interestLifetime_ = interestStruct.interestLifetime;
- nonce_.clear();
- if (interestStruct.nonce)
- nonce_.insert
- (nonce_.begin(), interestStruct.nonce, interestStruct.nonce + interestStruct.nonceLength);
+ setVector(nonce_, interestStruct.nonce, interestStruct.nonceLength);
}
void Interest::get(struct ndn_Interest &interestStruct) const