src: Improving consistency and correcting code style
As of this commit, all data structures can be directly constructed from
wire format.
This commit excludes full correction of code style in security/ and
tools/ndnsec*, which will be part of a different commit.
Change-Id: I121ac1f81948bc7468990df52cdefeb2988d91a1
Refs: #1403
diff --git a/src/security/secured-bag.hpp b/src/security/secured-bag.hpp
index 3a8cd29..5848981 100644
--- a/src/security/secured-bag.hpp
+++ b/src/security/secured-bag.hpp
@@ -16,9 +16,17 @@
class SecuredBag
{
public:
- struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };
+ class Error : public std::runtime_error
+ {
+ public:
+ explicit
+ Error(const std::string& what)
+ : std::runtime_error(what)
+ {
+ }
+ };
- SecuredBag()
+ SecuredBag()
: m_wire(tlv::security::IdentityPackage)
{}
@@ -34,12 +42,12 @@
m_wire.push_back(wireKey);
}
- virtual
+ virtual
~SecuredBag()
{}
-
+
void
- wireDecode(const Block &wire)
+ wireDecode(const Block& wire)
{
m_wire = wire;
m_wire.parse();
@@ -63,13 +71,13 @@
{
return m_cert;
}
-
+
ConstBufferPtr
getKey() const
{
return m_key;
}
-
+
private:
IdentityCertificate m_cert;
ConstBufferPtr m_key;