diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-26 02:48:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-26 02:48:32 +0300 |
commit | ab596ef3f4215f792feaa9ca1dfe5acb74c67328 (patch) | |
tree | ac5a4f31e2fa9c784d7de8d817654d47e21ccac2 /src/effectmanager.cpp | |
parent | 399f264360f6e8dfa31d0c3ff7d72aad8033888d (diff) | |
download | mv-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.gz mv-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.bz2 mv-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.xz mv-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.zip |
Add const to some classes.
Diffstat (limited to 'src/effectmanager.cpp')
-rw-r--r-- | src/effectmanager.cpp | 9 |
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; |