diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-19 15:25:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-20 17:05:57 +0300 |
commit | 48071e171de41a23197c7328ba038331a936e0eb (patch) | |
tree | 73c7ef1da8e5dd76469d75c0336d88c3371e4263 /src/particlecontainer.cpp | |
parent | d07fba228b5251862ad670e1d4f079c9456fab4b (diff) | |
download | manaplus-48071e171de41a23197c7328ba038331a936e0eb.tar.gz manaplus-48071e171de41a23197c7328ba038331a936e0eb.tar.bz2 manaplus-48071e171de41a23197c7328ba038331a936e0eb.tar.xz manaplus-48071e171de41a23197c7328ba038331a936e0eb.zip |
Replace for to FOR_EACH in some classes.
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 782b8fb24..4994ddadd 100644 --- a/src/particlecontainer.cpp +++ b/src/particlecontainer.cpp @@ -25,6 +25,9 @@ #include "debug.h" +typedef std::list<Particle *>::iterator ParticleListIter; +typedef std::list<Particle *>::const_iterator ParticleListCIter; + ParticleContainer::ParticleContainer(ParticleContainer *const parent, const bool delParent): mDelParent(delParent), @@ -93,11 +96,8 @@ void ParticleList::removeLocally(const Particle *const particle) void ParticleList::clearLocally() { - for (std::list<Particle *>::const_iterator it = mElements.begin(), - it_end = mElements.end(); it != it_end; ++ it) - { + FOR_EACH (ParticleListCIter, it, mElements) (*it)->kill(); - } mElements.clear(); } |