diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
commit | 5afe88df2538274859a162ffd63ed52118e80c19 (patch) | |
tree | b610dfd58dc748fd63f49565b2a43eea2316714f /src/particlecontainer.cpp | |
parent | 73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff) | |
download | mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2 mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz mana-5afe88df2538274859a162ffd63ed52118e80c19.zip |
Apply C++11 fixits
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
Diffstat (limited to 'src/particlecontainer.cpp')
-rw-r--r-- | src/particlecontainer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/particlecontainer.cpp b/src/particlecontainer.cpp index f48f1f44..002d4488 100644 --- a/src/particlecontainer.cpp +++ b/src/particlecontainer.cpp @@ -87,7 +87,7 @@ void ParticleList::removeLocally(Particle *particle) void ParticleList::clearLocally() { - for (std::list<Particle *>::iterator it = mElements.begin(); + for (auto it = mElements.begin(); it != mElements.end(); it++) (*it)->kill(); @@ -98,7 +98,7 @@ void ParticleList::moveTo(float x, float y) { ParticleContainer::moveTo(x, y); - for (std::list<Particle *>::iterator it = mElements.begin(); + for (auto it = mElements.begin(); it != mElements.end();) { (*it)->moveTo(x, y); @@ -145,7 +145,7 @@ void ParticleVector::delLocally(int index) Particle *p = mIndexedElements[index]; if (p) { - mIndexedElements[index] = NULL; + mIndexedElements[index] = nullptr; p->kill(); } } @@ -160,7 +160,7 @@ void ParticleVector::moveTo(float x, float y) { ParticleContainer::moveTo(x, y); - for (std::vector<Particle *>::iterator it = mIndexedElements.begin(); + for (auto it = mIndexedElements.begin(); it != mIndexedElements.end(); it++) { if (*it) |