Code style: Replace tab with space.
diff --git a/include/ndn-cpp/c/common.h b/include/ndn-cpp/c/common.h
index 7f47f7a..89392bc 100644
--- a/include/ndn-cpp/c/common.h
+++ b/include/ndn-cpp/c/common.h
@@ -5,7 +5,7 @@
*/
#ifndef NDN_COMMON_H
-#define NDN_COMMON_H
+#define NDN_COMMON_H
#include "../ndn-cpp-config.h"
#include <stdint.h>
diff --git a/include/ndn-cpp/c/data-types.h b/include/ndn-cpp/c/data-types.h
index 3c2abce..668786b 100644
--- a/include/ndn-cpp/c/data-types.h
+++ b/include/ndn-cpp/c/data-types.h
@@ -5,9 +5,9 @@
*/
#ifndef NDN_DATA_TYPES_H
-#define NDN_DATA_TYPES_H
+#define NDN_DATA_TYPES_H
-#ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
#endif
@@ -20,7 +20,7 @@
ndn_ContentType_NACK = 5
} ndn_ContentType;
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
diff --git a/include/ndn-cpp/c/forwarding-flags.h b/include/ndn-cpp/c/forwarding-flags.h
index ba6f6b5..863bf04 100644
--- a/include/ndn-cpp/c/forwarding-flags.h
+++ b/include/ndn-cpp/c/forwarding-flags.h
@@ -5,9 +5,9 @@
*/
#ifndef NDN_FORWARDING_FLAGS_H
-#define NDN_FORWARDING_FLAGS_H
+#define NDN_FORWARDING_FLAGS_H
-#ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
#endif
@@ -48,7 +48,7 @@
void ndn_ForwardingFlags_setForwardingEntryFlags(struct ndn_ForwardingFlags *self, int forwardingEntryFlags);
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
diff --git a/include/ndn-cpp/c/interest-types.h b/include/ndn-cpp/c/interest-types.h
index d6a5e51..21c80d9 100644
--- a/include/ndn-cpp/c/interest-types.h
+++ b/include/ndn-cpp/c/interest-types.h
@@ -5,9 +5,9 @@
*/
#ifndef NDN_INTEREST_TYPES_H
-#define NDN_INTEREST_TYPES_H
+#define NDN_INTEREST_TYPES_H
-#ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
#endif
@@ -18,7 +18,7 @@
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
diff --git a/include/ndn-cpp/encoding/oid.hpp b/include/ndn-cpp/encoding/oid.hpp
index bcbcfe9..bc0dd25 100644
--- a/include/ndn-cpp/encoding/oid.hpp
+++ b/include/ndn-cpp/encoding/oid.hpp
@@ -7,7 +7,7 @@
*/
#ifndef NDN_OID_HPP
-#define NDN_OID_HPP
+#define NDN_OID_HPP
#include <vector>
#include <string>
diff --git a/include/ndn-cpp/forwarding-entry.hpp b/include/ndn-cpp/forwarding-entry.hpp
index 675b56b..d56d03d 100644
--- a/include/ndn-cpp/forwarding-entry.hpp
+++ b/include/ndn-cpp/forwarding-entry.hpp
@@ -6,7 +6,7 @@
*/
#ifndef NDN_FORWARDING_ENTRY_HPP
-#define NDN_FORWARDING_ENTRY_HPP
+#define NDN_FORWARDING_ENTRY_HPP
#include <string>
#include "name.hpp"
diff --git a/include/ndn-cpp/forwarding-flags.hpp b/include/ndn-cpp/forwarding-flags.hpp
index 7f06dfd..d722275 100644
--- a/include/ndn-cpp/forwarding-flags.hpp
+++ b/include/ndn-cpp/forwarding-flags.hpp
@@ -6,7 +6,7 @@
*/
#ifndef NDN_FORWARDING_FLAGS_HPP
-#define NDN_FORWARDING_FLAGS_HPP
+#define NDN_FORWARDING_FLAGS_HPP
#include "c/forwarding-flags.h"
diff --git a/include/ndn-cpp/security/certificate/identity-certificate.hpp b/include/ndn-cpp/security/certificate/identity-certificate.hpp
index 41035a7..e9e90f5 100644
--- a/include/ndn-cpp/security/certificate/identity-certificate.hpp
+++ b/include/ndn-cpp/security/certificate/identity-certificate.hpp
@@ -7,7 +7,7 @@
*/
#ifndef NDN_IDENTITY_CERTIFICATE_HPP
-#define NDN_IDENTITY_CERTIFICATE_HPP
+#define NDN_IDENTITY_CERTIFICATE_HPP
#include "certificate.hpp"
diff --git a/include/ndn-cpp/security/certificate/public-key.hpp b/include/ndn-cpp/security/certificate/public-key.hpp
index fa8724f..0a48b5f 100644
--- a/include/ndn-cpp/security/certificate/public-key.hpp
+++ b/include/ndn-cpp/security/certificate/public-key.hpp
@@ -7,7 +7,7 @@
*/
#ifndef NDN_PUBLIC_KEY_HPP
-#define NDN_PUBLIC_KEY_HPP
+#define NDN_PUBLIC_KEY_HPP
#include "../../util/blob.hpp"
#include "../../encoding/oid.hpp"
diff --git a/include/ndn-cpp/security/encryption/encryption-manager.hpp b/include/ndn-cpp/security/encryption/encryption-manager.hpp
index 88a69c8..e6d29e9 100644
--- a/include/ndn-cpp/security/encryption/encryption-manager.hpp
+++ b/include/ndn-cpp/security/encryption/encryption-manager.hpp
@@ -6,7 +6,7 @@
*/
#ifndef NDN_ENCRYPTION_MANAGER_HPP
-#define NDN_ENCRYPTION_MANAGER_HPP
+#define NDN_ENCRYPTION_MANAGER_HPP
#include "../../name.hpp"
#include "../security-common.hpp"
diff --git a/include/ndn-cpp/security/identity/identity-storage.hpp b/include/ndn-cpp/security/identity/identity-storage.hpp
index d514dc8..d9b5e1a 100644
--- a/include/ndn-cpp/security/identity/identity-storage.hpp
+++ b/include/ndn-cpp/security/identity/identity-storage.hpp
@@ -7,7 +7,7 @@
*/
#ifndef NDN_IDENTITY_STORAGE_HPP
-#define NDN_IDENTITY_STORAGE_HPP
+#define NDN_IDENTITY_STORAGE_HPP
#include "../../name.hpp"
#include "../security-common.hpp"
diff --git a/include/ndn-cpp/security/identity/memory-identity-storage.hpp b/include/ndn-cpp/security/identity/memory-identity-storage.hpp
index cf8f318..9b7dd5f 100644
--- a/include/ndn-cpp/security/identity/memory-identity-storage.hpp
+++ b/include/ndn-cpp/security/identity/memory-identity-storage.hpp
@@ -6,7 +6,7 @@
*/
#ifndef NDN_MEMORY_IDENTITY_STORAGE_HPP
-#define NDN_MEMORY_IDENTITY_STORAGE_HPP
+#define NDN_MEMORY_IDENTITY_STORAGE_HPP
#include <vector>
#include "identity-storage.hpp"
diff --git a/include/ndn-cpp/security/identity/memory-private-key-storage.hpp b/include/ndn-cpp/security/identity/memory-private-key-storage.hpp
index 02f8fbc..6184c94 100644
--- a/include/ndn-cpp/security/identity/memory-private-key-storage.hpp
+++ b/include/ndn-cpp/security/identity/memory-private-key-storage.hpp
@@ -6,7 +6,7 @@
*/
#ifndef NDN_MEMORY_PRIVATE_KEY_STORAGE_HPP
-#define NDN_MEMORY_PRIVATE_KEY_STORAGE_HPP
+#define NDN_MEMORY_PRIVATE_KEY_STORAGE_HPP
#include <map>
#include "private-key-storage.hpp"
diff --git a/include/ndn-cpp/security/identity/private-key-storage.hpp b/include/ndn-cpp/security/identity/private-key-storage.hpp
index 5ade942..d253aa3 100644
--- a/include/ndn-cpp/security/identity/private-key-storage.hpp
+++ b/include/ndn-cpp/security/identity/private-key-storage.hpp
@@ -7,7 +7,7 @@
*/
#ifndef NDN_PRIVATE_KEY_STORAGE_HPP
-#define NDN_PRIVATE_KEY_STORAGE_HPP
+#define NDN_PRIVATE_KEY_STORAGE_HPP
#include <string>
#include "../../util/blob.hpp"
diff --git a/include/ndn-cpp/security/policy/no-verify-policy-manager.hpp b/include/ndn-cpp/security/policy/no-verify-policy-manager.hpp
index 8b72eda..9bfdd1c 100644
--- a/include/ndn-cpp/security/policy/no-verify-policy-manager.hpp
+++ b/include/ndn-cpp/security/policy/no-verify-policy-manager.hpp
@@ -7,7 +7,7 @@
*/
#ifndef NDN_NO_VERIFY_POLICY_MANAGER_HPP
-#define NDN_NO_VERIFY_POLICY_MANAGER_HPP
+#define NDN_NO_VERIFY_POLICY_MANAGER_HPP
#include "policy-manager.hpp"
diff --git a/include/ndn-cpp/security/policy/policy-manager.hpp b/include/ndn-cpp/security/policy/policy-manager.hpp
index 458f84f..5b3609d 100644
--- a/include/ndn-cpp/security/policy/policy-manager.hpp
+++ b/include/ndn-cpp/security/policy/policy-manager.hpp
@@ -7,7 +7,7 @@
*/
#ifndef NDN_POLICY_MANAGER_HPP
-#define NDN_POLICY_MANAGER_HPP
+#define NDN_POLICY_MANAGER_HPP
#include "../../data.hpp"
#include "../key-chain.hpp"
diff --git a/include/ndn-cpp/security/security-common.hpp b/include/ndn-cpp/security/security-common.hpp
index 1222480..76fc849 100644
--- a/include/ndn-cpp/security/security-common.hpp
+++ b/include/ndn-cpp/security/security-common.hpp
@@ -6,7 +6,7 @@
*/
#ifndef NDN_SECURITY_COMMON_HPP
-#define NDN_SECURITY_COMMON_HPP
+#define NDN_SECURITY_COMMON_HPP
namespace ndn {
diff --git a/include/ndn-cpp/security/security-exception.hpp b/include/ndn-cpp/security/security-exception.hpp
index f14948f..daf1d61 100644
--- a/include/ndn-cpp/security/security-exception.hpp
+++ b/include/ndn-cpp/security/security-exception.hpp
@@ -7,7 +7,7 @@
*/
#ifndef NDN_SECURITY_EXCEPTION_HPP
-#define NDN_SECURITY_EXCEPTION_HPP
+#define NDN_SECURITY_EXCEPTION_HPP
#include <exception>
#include <string>
diff --git a/include/ndn-cpp/sha256-with-rsa-signature.hpp b/include/ndn-cpp/sha256-with-rsa-signature.hpp
index 25eb6ae..276c971 100644
--- a/include/ndn-cpp/sha256-with-rsa-signature.hpp
+++ b/include/ndn-cpp/sha256-with-rsa-signature.hpp
@@ -6,7 +6,7 @@
*/
#ifndef NDN_SHA256_WITH_RSA_SIGNATURE_HPP
-#define NDN_SHA256_WITH_RSA_SIGNATURE_HPP
+#define NDN_SHA256_WITH_RSA_SIGNATURE_HPP
#include "data.hpp"
#include "key.hpp"
diff --git a/include/ndn-cpp/util/blob.hpp b/include/ndn-cpp/util/blob.hpp
index 5bf5654..f81de6d 100644
--- a/include/ndn-cpp/util/blob.hpp
+++ b/include/ndn-cpp/util/blob.hpp
@@ -6,7 +6,7 @@
*/
#ifndef NDN_BLOB_HPP
-#define NDN_BLOB_HPP
+#define NDN_BLOB_HPP
#include "../common.hpp"
diff --git a/include/ndn-cpp/util/signed-blob.hpp b/include/ndn-cpp/util/signed-blob.hpp
index 7d9c4e1..6dac765 100644
--- a/include/ndn-cpp/util/signed-blob.hpp
+++ b/include/ndn-cpp/util/signed-blob.hpp
@@ -8,7 +8,7 @@
*/
#ifndef NDN_SIGNED_BLOB_HPP
-#define NDN_SIGNED_BLOB_HPP
+#define NDN_SIGNED_BLOB_HPP
#include "blob.hpp"
diff --git a/ndn-cpp/c/encoding/binary-xml-forwarding-entry.h b/ndn-cpp/c/encoding/binary-xml-forwarding-entry.h
index 4a23371..b08f292 100644
--- a/ndn-cpp/c/encoding/binary-xml-forwarding-entry.h
+++ b/ndn-cpp/c/encoding/binary-xml-forwarding-entry.h
@@ -5,14 +5,14 @@
*/
#ifndef NDN_BINARY_XML_FORWARDING_ENTRY_H
-#define NDN_BINARY_XML_FORWARDING_ENTRY_H
+#define NDN_BINARY_XML_FORWARDING_ENTRY_H
#include "../errors.h"
#include "../forwarding-entry.h"
#include "binary-xml-encoder.h"
#include "binary-xml-decoder.h"
-#ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
#endif
@@ -32,7 +32,7 @@
*/
ndn_Error ndn_decodeBinaryXmlForwardingEntry(struct ndn_ForwardingEntry *forwardingEntry, struct ndn_BinaryXmlDecoder *decoder);
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
diff --git a/ndn-cpp/c/name.c b/ndn-cpp/c/name.c
index d6864e9..355636d 100644
--- a/ndn-cpp/c/name.c
+++ b/ndn-cpp/c/name.c
@@ -37,11 +37,11 @@
int ndn_Name_match(struct ndn_Name *self, struct ndn_Name *name)
{
- // This name is longer than the name we are checking it against.
- if (self->nComponents > name->nComponents)
+ // This name is longer than the name we are checking it against.
+ if (self->nComponents > name->nComponents)
return 0;
- // Check if at least one of given components doesn't match.
+ // Check if at least one of given components doesn't match.
size_t i;
for (i = 0; i < self->nComponents; ++i) {
struct ndn_NameComponent *selfComponent = self->components + i;
@@ -52,5 +52,5 @@
return 0;
}
- return 1;
+ return 1;
}
diff --git a/ndn-cpp/c/util/blob.h b/ndn-cpp/c/util/blob.h
index 18bcd03..8d1f784 100644
--- a/ndn-cpp/c/util/blob.h
+++ b/ndn-cpp/c/util/blob.h
@@ -5,11 +5,11 @@
*/
#ifndef NDN_BLOB_H
-#define NDN_BLOB_H
+#define NDN_BLOB_H
#include <ndn-cpp/c/common.h>
-#ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
#endif
@@ -33,7 +33,7 @@
self->length = length;
}
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
diff --git a/ndn-cpp/encoding/oid.cpp b/ndn-cpp/encoding/oid.cpp
index 236e420..db1fbc3 100644
--- a/ndn-cpp/encoding/oid.cpp
+++ b/ndn-cpp/encoding/oid.cpp
@@ -26,7 +26,7 @@
pos = str.find_first_of('.', pos);
if(pos == string::npos)
- break;
+ break;
oid_.push_back(atoi(str.substr(ppos, pos - ppos).c_str()));
diff --git a/ndn-cpp/interest.cpp b/ndn-cpp/interest.cpp
index ceeffcd..92fe972 100644
--- a/ndn-cpp/interest.cpp
+++ b/ndn-cpp/interest.cpp
@@ -52,8 +52,8 @@
string
Exclude::toUri() const
{
- if (entries_.size() == 0)
- return "";
+ if (entries_.size() == 0)
+ return "";
ostringstream result;
for (unsigned i = 0; i < entries_.size(); ++i) {
diff --git a/ndn-cpp/name.cpp b/ndn-cpp/name.cpp
index c9b5e7f..6f42635 100644
--- a/ndn-cpp/name.cpp
+++ b/ndn-cpp/name.cpp
@@ -323,7 +323,7 @@
bool
Name::equals(const Name& name) const
{
- if (components_.size() != name.components_.size())
+ if (components_.size() != name.components_.size())
return false;
for (size_t i = 0; i < components_.size(); ++i) {
@@ -331,7 +331,7 @@
return false;
}
- return true;
+ return true;
}
bool
@@ -339,17 +339,17 @@
{
// Imitate ndn_Name_match.
- // This name is longer than the name we are checking it against.
- if (components_.size() > name.components_.size())
+ // This name is longer than the name we are checking it against.
+ if (components_.size() > name.components_.size())
return false;
- // Check if at least one of given components doesn't match.
+ // Check if at least one of given components doesn't match.
for (size_t i = 0; i < components_.size(); ++i) {
if (*components_[i].getValue() != *name.components_[i].getValue())
return false;
}
- return true;
+ return true;
}
void
diff --git a/ndn-cpp/node.cpp b/ndn-cpp/node.cpp
index c145d50..1ce715c 100644
--- a/ndn-cpp/node.cpp
+++ b/ndn-cpp/node.cpp
@@ -306,17 +306,17 @@
int iResult = -1;
- for (size_t i = 0; i < pendingInterestTable_.size(); ++i) {
- if (ndn_Interest_matchesName((struct ndn_Interest *)&pendingInterestTable_[i]->getInterestStruct(), &nameStruct)) {
+ for (size_t i = 0; i < pendingInterestTable_.size(); ++i) {
+ if (ndn_Interest_matchesName((struct ndn_Interest *)&pendingInterestTable_[i]->getInterestStruct(), &nameStruct)) {
if (iResult < 0 ||
pendingInterestTable_[i]->getInterestStruct().name.nComponents >
pendingInterestTable_[iResult]->getInterestStruct().name.nComponents)
// Update to the longer match.
iResult = i;
}
- }
+ }
- return iResult;
+ return iResult;
}
Node::RegisteredPrefix*
@@ -324,17 +324,17 @@
{
int iResult = -1;
- for (size_t i = 0; i < registeredPrefixTable_.size(); ++i) {
- if (registeredPrefixTable_[i]->getPrefix()->match(name)) {
+ for (size_t i = 0; i < registeredPrefixTable_.size(); ++i) {
+ if (registeredPrefixTable_[i]->getPrefix()->match(name)) {
if (iResult < 0 ||
registeredPrefixTable_[i]->getPrefix()->getComponentCount() > registeredPrefixTable_[iResult]->getPrefix()->getComponentCount())
// Update to the longer match.
iResult = i;
}
- }
+ }
if (iResult >= 0)
- return registeredPrefixTable_[iResult].get();
+ return registeredPrefixTable_[iResult].get();
else
return 0;
}
diff --git a/ndn-cpp/util/changed-event.hpp b/ndn-cpp/util/changed-event.hpp
index 71be366..e20f3d5 100644
--- a/ndn-cpp/util/changed-event.hpp
+++ b/ndn-cpp/util/changed-event.hpp
@@ -6,7 +6,7 @@
*/
#ifndef NDN_CHANGED_EVENT_HPP
-#define NDN_CHANGED_EVENT_HPP
+#define NDN_CHANGED_EVENT_HPP
#include <vector>
#include <ndn-cpp/common.hpp>
diff --git a/ndn-cpp/util/logging.hpp b/ndn-cpp/util/logging.hpp
index f1afe72..b668133 100644
--- a/ndn-cpp/util/logging.hpp
+++ b/ndn-cpp/util/logging.hpp
@@ -7,7 +7,7 @@
*/
#ifndef NDN_LOGGING_HPP
-#define NDN_LOGGING_HPP
+#define NDN_LOGGING_HPP
#include <ndn-cpp//common.hpp>