Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /intern/memutil/MEM_RefCounted.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/memutil/MEM_RefCounted.h')
-rw-r--r--intern/memutil/MEM_RefCounted.h91
1 files changed, 45 insertions, 46 deletions
diff --git a/intern/memutil/MEM_RefCounted.h b/intern/memutil/MEM_RefCounted.h
index 0dccf790caa..28b24d04586 100644
--- a/intern/memutil/MEM_RefCounted.h
+++ b/intern/memutil/MEM_RefCounted.h
@@ -34,71 +34,70 @@
* The default destructor of this object has been made protected on purpose.
* This disables the creation of shared objects on the stack.
*
- * @author Maarten Gribnau
- * @date March 31, 2001
+ * @author Maarten Gribnau
+ * @date March 31, 2001
*/
class MEM_RefCounted {
-public:
- /**
- * Constructs a a shared object.
- */
- MEM_RefCounted() : m_refCount(1)
- {
- }
+ public:
+ /**
+ * Constructs a a shared object.
+ */
+ MEM_RefCounted() : m_refCount(1)
+ {
+ }
- /**
- * Returns the reference count of this object.
- * @return the reference count.
- */
- inline virtual int getRef() const;
+ /**
+ * Returns the reference count of this object.
+ * @return the reference count.
+ */
+ inline virtual int getRef() const;
- /**
- * Increases the reference count of this object.
- * @return the new reference count.
- */
- inline virtual int incRef();
+ /**
+ * Increases the reference count of this object.
+ * @return the new reference count.
+ */
+ inline virtual int incRef();
- /**
- * Decreases the reference count of this object.
- * If the reference count reaches zero, the object self-destructs.
- * @return the new reference count.
- */
- inline virtual int decRef();
+ /**
+ * Decreases the reference count of this object.
+ * If the reference count reaches zero, the object self-destructs.
+ * @return the new reference count.
+ */
+ inline virtual int decRef();
-protected:
- /**
- * Destructs a shared object.
- * The destructor is protected to force the use of incRef and decRef.
- */
- virtual ~MEM_RefCounted()
- {
- }
+ protected:
+ /**
+ * Destructs a shared object.
+ * The destructor is protected to force the use of incRef and decRef.
+ */
+ virtual ~MEM_RefCounted()
+ {
+ }
-protected:
- /// The reference count.
- int m_refCount;
+ protected:
+ /// The reference count.
+ int m_refCount;
};
-
inline int MEM_RefCounted::getRef() const
{
- return m_refCount;
+ return m_refCount;
}
inline int MEM_RefCounted::incRef()
{
- return ++m_refCount;
+ return ++m_refCount;
}
inline int MEM_RefCounted::decRef()
{
- m_refCount--;
- if (m_refCount == 0) {
- delete this;
- return 0;
- }
- return m_refCount;
+ m_refCount--;
+ if (m_refCount == 0) {
+ delete this;
+ return 0;
+ }
+ return m_refCount;
}
-#endif // __MEM_REFCOUNTED_H__
+#endif // __MEM_REFCOUNTED_H__