# HG changeset patch # User Mathieu Lacage # Date 1215537115 25200 # Node ID 775777e528336f3cc63237f80755b99f90f52e7d # Parent 88e4aa2f101ceb87db3931ab3cd822c0aa7b1074 coding style diff -r 88e4aa2f101c -r 775777e52833 src/core/ref-count-base.h --- a/src/core/ref-count-base.h Tue Jul 08 10:10:26 2008 -0700 +++ b/src/core/ref-count-base.h Tue Jul 08 10:11:55 2008 -0700 @@ -50,14 +50,15 @@ * 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 @@ // 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; }