summaryrefslogtreecommitdiff
path: root/src/particle/particlevector.cpp
diff options
context:
space:
mode:
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;
+}