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/qquickitemparticle.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/qquickitemparticle.cpp')
-rw-r--r-- | src/particles/qquickitemparticle.cpp | 2 |
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++){ |