From 48071e171de41a23197c7328ba038331a936e0eb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 19 Jan 2013 15:25:24 +0300 Subject: Replace for to FOR_EACH in some classes. --- src/particlecontainer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/particlecontainer.cpp') 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::iterator ParticleListIter; +typedef std::list::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::const_iterator it = mElements.begin(), - it_end = mElements.end(); it != it_end; ++ it) - { + FOR_EACH (ParticleListCIter, it, mElements) (*it)->kill(); - } mElements.clear(); } -- cgit v1.2.3-60-g2f50