aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles/qquickitemparticle.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-03-03 14:18:52 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-03-04 10:43:03 +0000
commit62ecfe55f414d0d04a4344bc6934b4b01408190f (patch)
treeb86869e2a938c4cacda2b627479479d319cd2873 /src/particles/qquickitemparticle.cpp
parent13c8aecdfccc9d15c367a9d45ec575f1542a90fd (diff)
Particles: code clean-up.
Replace QHash<int, QQuickParticleGroupData*> groupData with a QVarLengthArray, and make sure that those integers (== indices) are continuous, re-used, and start at zero. That way a whole bunch of qhash calls, hash node creatrion/deletion, and other overhead is removed. Change-Id: Ie74fab8a3e3c7b6efa15b7b9ceff1d1a3e9820e9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/particles/qquickitemparticle.cpp')
-rw-r--r--src/particles/qquickitemparticle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/particles/qquickitemparticle.cpp b/src/particles/qquickitemparticle.cpp
index 86dc04ea5a..4cd8ee9db8 100644
--- a/src/particles/qquickitemparticle.cpp
+++ b/src/particles/qquickitemparticle.cpp
@@ -278,7 +278,7 @@ void QQuickItemParticle::prepareNextFrame()
//TODO: Size, better fade?
foreach (const QString &str, m_groups){
const int gIdx = m_system->groupIds[str];
- const QVector<QQuickParticleData*> dataVector = m_system->groupData.value(gIdx)->data;
+ const QVector<QQuickParticleData*> dataVector = m_system->groupData[gIdx]->data;
const int count = dataVector.size();
for (int i=0; i<count; i++){