summaryrefslogtreecommitdiff
path: root/src/particle/particlevector.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-08 00:30:16 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-08 00:30:16 +0300
commit5d78828e2970841d908c6fc2f8595f1606137154 (patch)
treec59084c09f31ce80a9662255ed1b775c3e416052 /src/particle/particlevector.cpp
parentea407dcf7f05a00224a1e3fdabf1273a4a60b0df (diff)
downloadplus-5d78828e2970841d908c6fc2f8595f1606137154.tar.gz
plus-5d78828e2970841d908c6fc2f8595f1606137154.tar.bz2
plus-5d78828e2970841d908c6fc2f8595f1606137154.tar.xz
plus-5d78828e2970841d908c6fc2f8595f1606137154.zip
Fix particles counter in being popup.evolrelease2016-08-07
Diffstat (limited to 'src/particle/particlevector.cpp')
-rw-r--r--src/particle/particlevector.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/particle/particlevector.cpp b/src/particle/particlevector.cpp
index d0594a2dd..a38db6d01 100644
--- a/src/particle/particlevector.cpp
+++ b/src/particle/particlevector.cpp
@@ -95,3 +95,15 @@ void ParticleVector::moveTo(const float x, const float y)
}
}
}
+
+size_t ParticleVector::usedSize() const
+{
+ size_t cnt = 0;
+ for (std::vector<Particle *>::const_iterator it = mIndexedElements.begin();
+ it != mIndexedElements.end(); ++it)
+ {
+ if (*it)
+ cnt ++;
+ }
+ return cnt;
+}