Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=9b6e8fd01aff0f8c33ad12019c01828069b29bfe

commit 9b6e8fd01aff0f8c33ad12019c01828069b29bfe
Author: Michel Hermier <herm...@frugalware.org>
Date:   Fri Oct 17 09:04:13 2014 +0200

libpacman: Move acquire/release static version of refcounting helper inside of 
the class (to avoid namespace polution).

diff --git a/lib/libpacman/kernel/frefcounted.h 
b/lib/libpacman/kernel/frefcounted.h
index 9e32621..51c26fc 100644
--- a/lib/libpacman/kernel/frefcounted.h
+++ b/lib/libpacman/kernel/frefcounted.h
@@ -38,7 +38,20 @@ namespace flib

public:
void acquire() const;
+               static inline void acquire(flib::refcounted *refcounted)
+               {
+                       if(refcounted != nullptr) {
+                               refcounted->acquire();
+                       }
+               }
+
void release() const;
+               static inline void release(flib::refcounted *refcounted)
+               {
+                       if(refcounted != nullptr) {
+                               refcounted->release();
+                       }
+               }

private:
void operator delete[](void *ptr);
@@ -49,20 +62,6 @@ namespace flib

mutable unsigned m_reference_counter;
};
-
-       static inline void acquire(flib::refcounted *refcounted)
-       {
-               if(refcounted != nullptr) {
-                       refcounted->acquire();
-               }
-       }
-
-       static inline void release(flib::refcounted *refcounted)
-       {
-               if(refcounted != nullptr) {
-                       refcounted->release();
-               }
-       }
}

#endif /* FREFCOUNTED_H */
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to