diff options
author | Kaj Grönholm <kaj.gronholm@qt.io> | 2020-11-03 10:29:22 +0200 |
---|---|---|
committer | Kaj Grönholm <kaj.gronholm@qt.io> | 2020-11-05 10:00:37 +0200 |
commit | 5fa85ded71f4bd81b6332d8aecda3edd658f7a39 (patch) | |
tree | 96afc61930beab961bbc99e570415744b22b479f /src/particles/qquickparticlesystem_p.h | |
parent | 43d0eae81e30ae8c8502e68d56c6c8b7e2c30215 (diff) |
Cleanup and optimize particles
Minor improvements while going through the particles sources:
- Reduce getShadowDatum() calls
- Remove unused m_lastLevel, reloadColor(), m_available
m_velocityFromMovement, maximumAlive, m_pending, m_lastT,
m_last_last_last_emitter, modelIndex
- Color4ub structs can be assigned directly
- Fix pri for shaders_ng files
- Other minor refactoring
Task-number: QTBUG-88124
Change-Id: I5768fed9f4b6379a698849c23436fa38169833a4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/particles/qquickparticlesystem_p.h')
-rw-r--r-- | src/particles/qquickparticlesystem_p.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/particles/qquickparticlesystem_p.h b/src/particles/qquickparticlesystem_p.h index 0269b8a583..8b14b74131 100644 --- a/src/particles/qquickparticlesystem_p.h +++ b/src/particles/qquickparticlesystem_p.h @@ -200,10 +200,12 @@ public: QQuickParticleGroupData(const QString &name, QQuickParticleSystem* sys); ~QQuickParticleGroupData(); - int size() - { return m_size; } + int size() const + { + return m_size; + } - QString name(); + QString name() const; void setSize(int newSize); @@ -321,7 +323,6 @@ public: //Used by ItemParticle QQuickItem* delegate; - int modelIndex; //Used by custom affectors float update; @@ -359,7 +360,10 @@ public: return m_running; } - int count(){ return particleCount; } + int count() const + { + return particleCount; + } static const int maxLife = 600000; |