summaryrefslogtreecommitdiffstats
path: root/src/datavis3d/utils
diff options
context:
space:
mode:
authorHeikkinen Miikka <miikka.heikkinen@digia.com>2013-09-05 11:56:47 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2013-09-05 12:33:32 +0300
commit8f1ad0ed8c88927fb44350de477200cf09c231fb (patch)
treeb2ec3b65f4f3deb12ddf11aecd9e65ab46b7eecb /src/datavis3d/utils
parent263f8a781050512382909c5173373a4ced21ae60 (diff)
Fixing more Valgrind found problems
Change-Id: I11023faee65f7a660d63986bd2f7211fcd90964a Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'src/datavis3d/utils')
-rw-r--r--src/datavis3d/utils/surfaceobject.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/datavis3d/utils/surfaceobject.cpp b/src/datavis3d/utils/surfaceobject.cpp
index 4c05c442..b985bec0 100644
--- a/src/datavis3d/utils/surfaceobject.cpp
+++ b/src/datavis3d/utils/surfaceobject.cpp
@@ -122,10 +122,8 @@ void SurfaceObject::setUpSmoothData(QList<qreal> series, int columns, int rows,
createBuffers(vertices, uvs, normals, indices, gridIndices, changeGeometry);
- if (indices)
- delete indices;
- if (gridIndices)
- delete gridIndices;
+ delete[] indices;
+ delete[] gridIndices;
}
@@ -216,13 +214,10 @@ void SurfaceObject::setUpData(QList<qreal> series, int columns, int rows, GLfloa
createBuffers(vertices, uvs, normals, indices, gridIndices, changeGeometry);
- if (indices)
- delete indices;
- if (gridIndices)
- delete gridIndices;
+ delete[] indices;
+ delete[] gridIndices;
}
-
void SurfaceObject::createBuffers(const QVector<QVector3D> &vertices, const QVector<QVector2D> &uvs,
const QVector<QVector3D> &normals, const GLint *indices,
const GLint *gridIndices, bool changeGeometry)