summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-11-10 14:52:40 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-19 11:50:04 +0100
commitcc568ec342161edee01ecae74ac11bb4c2da46b7 (patch)
treeeea8c544f1e4149101c8bedf363209a49f920af6 /src/corelib
parent66f192e29478ea586ff14741a734e590375d5bf2 (diff)
Remove obsolete function
QVectorData::allocate is able to handle higher alignment that QVectorData::malloc didn't. This was kept for BC issues in the 4.x series, we can drop it now. Change-Id: I7782bd2910de6b9c8dee3e63e621629dc3889d33 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qvector.cpp8
-rw-r--r--src/corelib/tools/qvector.h4
2 files changed, 0 insertions, 12 deletions
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index 59ca11179b..a7a6add15a 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -56,14 +56,6 @@ static inline int alignmentThreshold()
const QVectorData QVectorData::shared_null = { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, false, 0 };
-QVectorData *QVectorData::malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init)
-{
- QVectorData* p = (QVectorData *)::malloc(sizeofTypedData + (size - 1) * sizeofT);
- Q_CHECK_PTR(p);
- ::memcpy(p, init, sizeofTypedData + (qMin(size, init->alloc) - 1) * sizeofT);
- return p;
-}
-
QVectorData *QVectorData::allocate(int size, int alignment)
{
return static_cast<QVectorData *>(alignment > alignmentThreshold() ? qMallocAligned(size, alignment) : ::malloc(size));
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 51364df91d..0116d1db6c 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -78,10 +78,6 @@ struct Q_CORE_EXPORT QVectorData
#endif
static const QVectorData shared_null;
- // ### Qt 5: rename to 'allocate()'. The current name causes problems for
- // some debugges when the QVector is member of a class within an unnamed namespace.
- // ### Qt 5: can be removed completely. (Ralf)
- static QVectorData *malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init);
static QVectorData *allocate(int size, int alignment);
static QVectorData *reallocate(QVectorData *old, int newsize, int oldsize, int alignment);
static void free(QVectorData *data, int alignment);