From dfafc9f68bc2eba4518e6934d979c48be2a658fa Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Tue, 8 Jul 2008 10:11:55 -0700 Subject: [PATCH] coding style --- src/core/ref-count-base.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/core/ref-count-base.h b/src/core/ref-count-base.h index 4ce8440c9..4fa704488 100644 --- a/src/core/ref-count-base.h +++ b/src/core/ref-count-base.h @@ -50,14 +50,15 @@ public: * conjunction with the Ptr template which would make calling Ref * unecessary and dangerous. */ - inline void Ref () const; + inline void Ref (void) const; /** * Decrement the reference count. This method should not be called * by user code. RefCountBase instances are expected to be used in * conjunction with the Ptr template which would make calling Ref * unecessary and dangerous. */ - inline void Unref () const; + inline void Unref (void) const; + private: // Note we make this mutable so that the const methods can still // change it. @@ -70,15 +71,16 @@ namespace ns3 { // Implementation of the in-line methods void -RefCountBase::Ref () const +RefCountBase::Ref (void) const { m_count++; } void -RefCountBase::Unref () const +RefCountBase::Unref (void) const { - if (--m_count == 0) + m_count--; + if (m_count == 0) { // All references removed, ok to delete delete this; }