src: Updating code style to conform (more or less) to ndn-cxx style
Also, adding .clang-format that describes the applied style. Note that
this style requires a slightly customized version of clang-format.
diff --git a/utils/ndn-fw-hop-count-tag.cpp b/utils/ndn-fw-hop-count-tag.cpp
index f4d65db..027bdfe 100644
--- a/utils/ndn-fw-hop-count-tag.cpp
+++ b/utils/ndn-fw-hop-count-tag.cpp
@@ -24,41 +24,39 @@
namespace ndn {
TypeId
-FwHopCountTag::GetTypeId ()
+FwHopCountTag::GetTypeId()
{
- static TypeId tid = TypeId("ns3::ndn::FwHopCountTag")
- .SetParent<Tag>()
- .AddConstructor<FwHopCountTag>()
- ;
+ static TypeId tid =
+ TypeId("ns3::ndn::FwHopCountTag").SetParent<Tag>().AddConstructor<FwHopCountTag>();
return tid;
}
TypeId
-FwHopCountTag::GetInstanceTypeId () const
+FwHopCountTag::GetInstanceTypeId() const
{
- return FwHopCountTag::GetTypeId ();
+ return FwHopCountTag::GetTypeId();
}
uint32_t
-FwHopCountTag::GetSerializedSize () const
+FwHopCountTag::GetSerializedSize() const
{
return sizeof(uint32_t);
}
void
-FwHopCountTag::Serialize (TagBuffer i) const
+FwHopCountTag::Serialize(TagBuffer i) const
{
- i.WriteU32 (m_hopCount);
-}
-
-void
-FwHopCountTag::Deserialize (TagBuffer i)
-{
- m_hopCount = i.ReadU32 ();
+ i.WriteU32(m_hopCount);
}
void
-FwHopCountTag::Print (std::ostream &os) const
+FwHopCountTag::Deserialize(TagBuffer i)
+{
+ m_hopCount = i.ReadU32();
+}
+
+void
+FwHopCountTag::Print(std::ostream& os) const
{
os << m_hopCount;
}