From 947b385fa6ea259c1a9a5c99799e6a16b8bba689 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 3 May 2016 14:46:58 +0000 Subject: [PATCH] fix compiler warnings about non-heap free Signed-off-by: Ivailo Monev --- src/core/tools/qbytearray.h | 2 +- src/core/tools/qlist.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/tools/qbytearray.h b/src/core/tools/qbytearray.h index fd0e92883..4f184cdb4 100644 --- a/src/core/tools/qbytearray.h +++ b/src/core/tools/qbytearray.h @@ -358,7 +358,7 @@ public: }; inline QByteArray::QByteArray(): d(&shared_null) { d->ref.ref(); } -inline QByteArray::~QByteArray() { if (!d->ref.deref()) free(d); } +inline QByteArray::~QByteArray() { if (!d->ref.deref()) delete d; } inline int QByteArray::size() const { return d->size; } diff --git a/src/core/tools/qlist.h b/src/core/tools/qlist.h index a19a0e550..94eacd888 100644 --- a/src/core/tools/qlist.h +++ b/src/core/tools/qlist.h @@ -737,7 +737,7 @@ Q_OUTOFLINE_TEMPLATE void QList::freeData(QListData::Data *data) { node_destruct(reinterpret_cast(data->array + data->begin), reinterpret_cast(data->array + data->end)); - free(data); + delete data; } -- 2.11.0