diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2016-03-03 14:18:52 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2016-03-04 10:43:03 +0000 |
commit | 62ecfe55f414d0d04a4344bc6934b4b01408190f (patch) | |
tree | b86869e2a938c4cacda2b627479479d319cd2873 /src/particles/qquickparticleaffector.cpp | |
parent | 13c8aecdfccc9d15c367a9d45ec575f1542a90fd (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/qquickparticleaffector.cpp')
-rw-r--r-- | src/particles/qquickparticleaffector.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/particles/qquickparticleaffector.cpp b/src/particles/qquickparticleaffector.cpp index 139b0d9bbe..1878908a5d 100644 --- a/src/particles/qquickparticleaffector.cpp +++ b/src/particles/qquickparticleaffector.cpp @@ -200,7 +200,7 @@ void QQuickParticleAffector::affectSystem(qreal dt) if (m_onceOff) dt = 1.0; foreach (QQuickParticleGroupData* gd, m_system->groupData) { - if (activeGroup(m_system->groupData.key(gd))) { + if (activeGroup(gd->index)) { foreach (QQuickParticleData* d, gd->data) { if (shouldAffect(d)) { bool affected = false; |