code style: Don't use std:: inside .cpp files.
diff --git a/ndn-cpp/encoding/binary-xml-decoder.hpp b/ndn-cpp/encoding/binary-xml-decoder.hpp
index 3e371c3..e7583e5 100644
--- a/ndn-cpp/encoding/binary-xml-decoder.hpp
+++ b/ndn-cpp/encoding/binary-xml-decoder.hpp
@@ -12,8 +12,9 @@
#include "../c/errors.h"
#include "../c/encoding/binary-xml-decoder.h"
-namespace ndn {
+using namespace std;
+namespace ndn {
/**
* A BinaryXmlDecoder extends a C ndn_BinaryXmlDecoder struct and wraps related functions.
@@ -40,7 +41,7 @@
int gotExpectedTag;
ndn_Error error;
if ((error = ndn_BinaryXmlDecoder_peekDTag(this, expectedTag, &gotExpectedTag)))
- throw std::runtime_error(ndn_getErrorString(error));
+ throw runtime_error(ndn_getErrorString(error));
return gotExpectedTag;
}
diff --git a/ndn-cpp/encoding/binary-xml-structure-decoder.hpp b/ndn-cpp/encoding/binary-xml-structure-decoder.hpp
index 9ffd72b..2707763 100644
--- a/ndn-cpp/encoding/binary-xml-structure-decoder.hpp
+++ b/ndn-cpp/encoding/binary-xml-structure-decoder.hpp
@@ -36,7 +36,7 @@
{
ndn_Error error;
if ((error = ndn_BinaryXmlStructureDecoder_findElementEnd(this, input, inputLength)))
- throw std::runtime_error(ndn_getErrorString(error));
+ throw runtime_error(ndn_getErrorString(error));
return gotElementEnd();
}
diff --git a/ndn-cpp/encoding/binary-xml-wire-format.cpp b/ndn-cpp/encoding/binary-xml-wire-format.cpp
index 9bd6759..b1f4007 100644
--- a/ndn-cpp/encoding/binary-xml-wire-format.cpp
+++ b/ndn-cpp/encoding/binary-xml-wire-format.cpp
@@ -41,7 +41,7 @@
BinaryXmlEncoder encoder;
ndn_Error error;
if ((error = ndn_encodeBinaryXmlInterest(&interestStruct, &encoder)))
- throw std::runtime_error(ndn_getErrorString(error));
+ throw runtime_error(ndn_getErrorString(error));
return encoder.getOutput();
}
@@ -59,7 +59,7 @@
BinaryXmlDecoder decoder(input, inputLength);
ndn_Error error;
if ((error = ndn_decodeBinaryXmlInterest(&interestStruct, &decoder)))
- throw std::runtime_error(ndn_getErrorString(error));
+ throw runtime_error(ndn_getErrorString(error));
interest.set(interestStruct);
}
@@ -78,7 +78,7 @@
BinaryXmlEncoder encoder;
ndn_Error error;
if ((error = ndn_encodeBinaryXmlData(&dataStruct, signedPortionBeginOffset, signedPortionEndOffset, &encoder)))
- throw std::runtime_error(ndn_getErrorString(error));
+ throw runtime_error(ndn_getErrorString(error));
return encoder.getOutput();
}
@@ -97,7 +97,7 @@
BinaryXmlDecoder decoder(input, inputLength);
ndn_Error error;
if ((error = ndn_decodeBinaryXmlData(&dataStruct, signedPortionBeginOffset, signedPortionEndOffset, &decoder)))
- throw std::runtime_error(ndn_getErrorString(error));
+ throw runtime_error(ndn_getErrorString(error));
data.set(dataStruct);
}
@@ -114,7 +114,7 @@
BinaryXmlEncoder encoder;
ndn_Error error;
if ((error = ndn_encodeBinaryXmlForwardingEntry(&forwardingEntryStruct, &encoder)))
- throw std::runtime_error(ndn_getErrorString(error));
+ throw runtime_error(ndn_getErrorString(error));
return encoder.getOutput();
}
@@ -130,7 +130,7 @@
BinaryXmlDecoder decoder(input, inputLength);
ndn_Error error;
if ((error = ndn_decodeBinaryXmlForwardingEntry(&forwardingEntryStruct, &decoder)))
- throw std::runtime_error(ndn_getErrorString(error));
+ throw runtime_error(ndn_getErrorString(error));
forwardingEntry.set(forwardingEntryStruct);
}
diff --git a/ndn-cpp/encoding/der/der.cpp b/ndn-cpp/encoding/der/der.cpp
index 6d269c1..fc31161 100644
--- a/ndn-cpp/encoding/der/der.cpp
+++ b/ndn-cpp/encoding/der/der.cpp
@@ -297,7 +297,7 @@
DerNode::encodeHeader(payload_.size());
}
-DerByteString::DerByteString(const std::vector<uint8_t>& blob, DerType type)
+DerByteString::DerByteString(const vector<uint8_t>& blob, DerType type)
:DerNode(type)
{
payload_.insert(payload_.end(), blob.begin(), blob.end());
diff --git a/ndn-cpp/encoding/der/visitor/print-visitor.cpp b/ndn-cpp/encoding/der/visitor/print-visitor.cpp
index ab56b5d..cba5d2d 100644
--- a/ndn-cpp/encoding/der/visitor/print-visitor.cpp
+++ b/ndn-cpp/encoding/der/visitor/print-visitor.cpp
@@ -50,7 +50,7 @@
const string& indent = ndnboost::any_cast<const string&>(param);
printData(derBStr.getHeader(), indent);
- const std::vector<uint8_t>& payload = derBStr.getPayload();
+ const vector<uint8_t>& payload = derBStr.getPayload();
cout << indent << " " << " " << hex << setw(2) << setfill('0') << (int)(uint8_t)payload[0] << endl;
printData(payload, indent + " ", 1);
}