summaryrefslogtreecommitdiff
path: root/src/effectmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-26 02:48:32 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-26 02:48:32 +0300
commitab596ef3f4215f792feaa9ca1dfe5acb74c67328 (patch)
treeac5a4f31e2fa9c784d7de8d817654d47e21ccac2 /src/effectmanager.cpp
parent399f264360f6e8dfa31d0c3ff7d72aad8033888d (diff)
downloadmanaplus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.gz
manaplus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.bz2
manaplus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.xz
manaplus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.zip
Add const to some classes.
Diffstat (limited to 'src/effectmanager.cpp')
-rw-r--r--src/effectmanager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp
index 5663b95b8..42c6d471d 100644
--- a/src/effectmanager.cpp
+++ b/src/effectmanager.cpp
@@ -32,7 +32,7 @@
EffectManager::EffectManager()
{
XML::Document doc("effects.xml");
- XmlNodePtr root = doc.rootNode();
+ const XmlNodePtr root = doc.rootNode();
if (!root || !xmlNameEqual(root, "being-effects"))
{
@@ -61,7 +61,7 @@ EffectManager::~EffectManager()
{
}
-bool EffectManager::trigger(int id, Being* being)
+bool EffectManager::trigger(const int id, Being *const being)
{
if (!being || !particleEngine)
return false;
@@ -75,7 +75,8 @@ bool EffectManager::trigger(int id, Being* being)
rValue = true;
if (!(*i).GFX.empty())
{
- Particle *selfFX = particleEngine->addEffect((*i).GFX, 0, 0);
+ Particle *const selfFX = particleEngine->addEffect(
+ (*i).GFX, 0, 0);
being->controlParticle(selfFX);
}
if (!(*i).SFX.empty())
@@ -86,7 +87,7 @@ bool EffectManager::trigger(int id, Being* being)
return rValue;
}
-bool EffectManager::trigger(int id, int x, int y)
+bool EffectManager::trigger(const int id, const int x, const int y)
{
if (!particleEngine)
return false;