aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/ftw/qqmlrefcount_p.h
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-01-15 22:01:15 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-22 21:01:53 +0100
commite2ea0a83cc876fb54a2a8bf6f1350dbfa52f596b (patch)
tree36ec4b74aa50b9355e74e5d186039c3cdbd38acd /src/qml/qml/ftw/qqmlrefcount_p.h
parent2ce7959eb9e69cd68013fc6a0f77a9556a84365b (diff)
fix whitespace
remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/ftw/qqmlrefcount_p.h')
-rw-r--r--src/qml/qml/ftw/qqmlrefcount_p.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/qml/qml/ftw/qqmlrefcount_p.h b/src/qml/qml/ftw/qqmlrefcount_p.h
index 24c3e7a2cc..de32f0e915 100644
--- a/src/qml/qml/ftw/qqmlrefcount_p.h
+++ b/src/qml/qml/ftw/qqmlrefcount_p.h
@@ -86,7 +86,7 @@ public:
inline QQmlRefPointer<T> &operator=(const QQmlRefPointer<T> &o);
inline QQmlRefPointer<T> &operator=(T *);
-
+
inline bool isNull() const { return !o; }
inline T* operator->() const { return o; }
@@ -100,27 +100,27 @@ private:
T *o;
};
-QQmlRefCount::QQmlRefCount()
-: refCount(1)
+QQmlRefCount::QQmlRefCount()
+: refCount(1)
{
}
-QQmlRefCount::~QQmlRefCount()
+QQmlRefCount::~QQmlRefCount()
{
Q_ASSERT(refCount.load() == 0);
}
-void QQmlRefCount::addref()
-{
+void QQmlRefCount::addref()
+{
Q_ASSERT(refCount.load() > 0);
- refCount.ref();
+ refCount.ref();
}
-void QQmlRefCount::release()
-{
+void QQmlRefCount::release()
+{
Q_ASSERT(refCount.load() > 0);
- if (!refCount.deref())
- destroy();
+ if (!refCount.deref())
+ destroy();
}
int QQmlRefCount::count() const
@@ -128,20 +128,20 @@ int QQmlRefCount::count() const
return refCount.load();
}
-void QQmlRefCount::destroy()
-{
- delete this;
+void QQmlRefCount::destroy()
+{
+ delete this;
}
template<class T>
QQmlRefPointer<T>::QQmlRefPointer()
-: o(0)
+: o(0)
{
}
template<class T>
QQmlRefPointer<T>::QQmlRefPointer(T *o)
-: o(o)
+: o(o)
{
if (o) o->addref();
}