summaryrefslogtreecommitdiff
path: root/src/particle
diff options
context:
space:
mode:
Diffstat (limited to 'src/particle')
-rw-r--r--src/particle/imageparticle.cpp6
-rw-r--r--src/particle/imageparticle.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/particle/imageparticle.cpp b/src/particle/imageparticle.cpp
index f6676303a..dbef1dd32 100644
--- a/src/particle/imageparticle.cpp
+++ b/src/particle/imageparticle.cpp
@@ -28,7 +28,7 @@
#include "debug.h"
-std::map<std::string, int> ImageParticle::imageParticleCountByName;
+StringIntMap ImageParticle::imageParticleCountByName;
ImageParticle::ImageParticle(Image *const image) :
Particle(),
@@ -39,7 +39,7 @@ ImageParticle::ImageParticle(Image *const image) :
mImage->incRef();
const std::string &name = mImage->getIdPath();
- std::map<std::string, int>::iterator it
+ StringIntMapIter it
= ImageParticle::imageParticleCountByName.find(name);
if (it == ImageParticle::imageParticleCountByName.end())
ImageParticle::imageParticleCountByName[name] = 1;
@@ -53,7 +53,7 @@ ImageParticle::~ImageParticle()
if (mImage)
{
const std::string &name = mImage->getIdPath();
- std::map<std::string, int>::iterator it
+ StringIntMapIter it
= ImageParticle::imageParticleCountByName.find(name);
if (it != ImageParticle::imageParticleCountByName.end())
{
diff --git a/src/particle/imageparticle.h b/src/particle/imageparticle.h
index 0a092d966..dcc705a71 100644
--- a/src/particle/imageparticle.h
+++ b/src/particle/imageparticle.h
@@ -25,6 +25,8 @@
#include "particle/particle.h"
+#include "utils/stringmap.h"
+
#include <map>
class Image;
@@ -60,7 +62,7 @@ class ImageParticle notfinal : public Particle
virtual void setAlpha(const float alpha) override final
{ mAlpha = alpha; }
- static std::map<std::string, int> imageParticleCountByName;
+ static StringIntMap imageParticleCountByName;
protected:
Image *mImage; /**< The image used for this particle. */
};