diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-08-08 14:57:39 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-09 03:26:08 +0200 |
commit | 9e96717746850205eba7d4957ddb4d0322875fff (patch) | |
tree | 67f4d6e4e7ffed2b501fd6baaab7d20c57907e1e | |
parent | 9f71ff69f2cabd70f89f764b1f9df757c68c0e10 (diff) |
Rename QLinkedList::free to freeData for consistency
QLinkedList does use allocations in the .h, by way of operator new and
operator delete. But for consistency with other classes, don't call our
function free().
Change-Id: I9295f5945619ad4ea82fd1f7f55b34700c54e06a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r-- | src/corelib/tools/qlinkedlist.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h index 1caf21f456..f91580f550 100644 --- a/src/corelib/tools/qlinkedlist.h +++ b/src/corelib/tools/qlinkedlist.h @@ -234,14 +234,14 @@ public: private: void detach_helper(); - void free(QLinkedListData*); + void freeData(QLinkedListData*); }; template <typename T> inline QLinkedList<T>::~QLinkedList() { if (!d->ref.deref()) - free(d); + freeData(d); } template <typename T> @@ -263,19 +263,19 @@ void QLinkedList<T>::detach_helper() } QT_CATCH(...) { copy->n = x.e; Q_ASSERT(!x.d->ref.deref()); // Don't trigger assert in free - free(x.d); + freeData(x.d); QT_RETHROW; } } copy->n = x.e; x.e->p = copy; if (!d->ref.deref()) - free(d); + freeData(d); d = x.d; } template <typename T> -void QLinkedList<T>::free(QLinkedListData *x) +void QLinkedList<T>::freeData(QLinkedListData *x) { Node *y = reinterpret_cast<Node*>(x); Node *i = y->n; @@ -301,7 +301,7 @@ QLinkedList<T> &QLinkedList<T>::operator=(const QLinkedList<T> &l) QLinkedListData *o = l.d; o->ref.ref(); if (!d->ref.deref()) - free(d); + freeData(d); d = o; if (!d->sharable) detach_helper(); |