coding style
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 08 Jul 2008 10:11:55 -0700
changeset 3392 775777e52833
parent 3391 88e4aa2f101c
child 3393 10369bf4b3e2
coding style
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;
     }