diff options
author | Robin Burchell <robin.burchell@collabora.com> | 2012-01-06 19:20:55 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-12 16:21:35 +0100 |
commit | d402acbc892a8cf447acece100357694188a69e6 (patch) | |
tree | f00e50e5f5bb9ddb8de04cd53401978b1bffcca2 /src/quick/scenegraph/coreapi/qsggeometry.cpp | |
parent | 39f9b5def185337b2087cadeb3e137dfbeb85fa4 (diff) |
Remove out-of-line uses of qMalloc/qFree/qRealloc.
Per http://codereview.qt-project.org/#change,11562, we are trying to remove these
in favour of direct allocation, or (in the case of inline code) specialised
out-of-line wrappers.
Change-Id: I113609c4f97dc5c8020a72cbd398572cdb5b7505
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsggeometry.cpp')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsggeometry.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp index b747bb96e3..311ee9b3fe 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.cpp +++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp @@ -183,7 +183,7 @@ QSGGeometry::QSGGeometry(const QSGGeometry::AttributeSet &attributes, QSGGeometry::~QSGGeometry() { if (m_owns_data) - qFree(m_data); + free(m_data); if (m_server_data) delete m_server_data; @@ -311,7 +311,7 @@ void QSGGeometry::allocate(int vertexCount, int indexCount) int vertexByteSize = m_attributes.stride * m_vertex_count; if (m_owns_data) - qFree(m_data); + free(m_data); if (canUsePrealloc && vertexByteSize <= (int) sizeof(m_prealloc)) { m_data = (void *) &m_prealloc[0]; @@ -320,7 +320,7 @@ void QSGGeometry::allocate(int vertexCount, int indexCount) } else { Q_ASSERT(m_index_type == GL_UNSIGNED_INT || m_index_type == GL_UNSIGNED_SHORT); int indexByteSize = indexCount * (m_index_type == GL_UNSIGNED_SHORT ? sizeof(quint16) : sizeof(quint32)); - m_data = (void *) qMalloc(vertexByteSize + indexByteSize); + m_data = (void *) malloc(vertexByteSize + indexByteSize); m_index_data_offset = vertexByteSize; m_owns_data = true; } |