diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-16 01:47:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-16 01:47:17 +0300 |
commit | b293d99a34d21d137374e46386b8669907cb3c1d (patch) | |
tree | 7e5e20e2b81e239878c13229c4d02139e8b85c2b /src/particle | |
parent | 34f943198afd1f7f342d63bd70d30cdeacd3dbad (diff) | |
download | manaplus-b293d99a34d21d137374e46386b8669907cb3c1d.tar.gz manaplus-b293d99a34d21d137374e46386b8669907cb3c1d.tar.bz2 manaplus-b293d99a34d21d137374e46386b8669907cb3c1d.tar.xz manaplus-b293d99a34d21d137374e46386b8669907cb3c1d.zip |
add missing const in xmlnode pointers.
Diffstat (limited to 'src/particle')
-rw-r--r-- | src/particle/animationparticle.cpp | 2 | ||||
-rw-r--r-- | src/particle/animationparticle.h | 2 | ||||
-rw-r--r-- | src/particle/particle.cpp | 2 | ||||
-rw-r--r-- | src/particle/particleemitter.cpp | 6 | ||||
-rw-r--r-- | src/particle/particleemitter.h | 10 |
5 files changed, 12 insertions, 10 deletions
diff --git a/src/particle/animationparticle.cpp b/src/particle/animationparticle.cpp index d7f31ca1e..4381ceb8a 100644 --- a/src/particle/animationparticle.cpp +++ b/src/particle/animationparticle.cpp @@ -32,7 +32,7 @@ AnimationParticle::AnimationParticle(Animation *const animation) : { } -AnimationParticle::AnimationParticle(XmlNodePtr const animationNode, +AnimationParticle::AnimationParticle(XmlNodePtrConst animationNode, const std::string& dyePalettes): ImageParticle(nullptr), mAnimation(new SimpleAnimation(animationNode, dyePalettes)) diff --git a/src/particle/animationparticle.h b/src/particle/animationparticle.h index da4d8f6cd..8b9df63e4 100644 --- a/src/particle/animationparticle.h +++ b/src/particle/animationparticle.h @@ -35,7 +35,7 @@ class AnimationParticle final : public ImageParticle public: explicit AnimationParticle(Animation *const animation); - explicit AnimationParticle(XmlNodePtr const animationNode, + explicit AnimationParticle(XmlNodePtrConst animationNode, const std::string& dyePalettes = std::string()); diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 576b292fa..a9cc9993f 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -290,7 +290,7 @@ Particle *Particle::addEffect(const std::string &particleEffectFile, const std::string dyePalettes = (pos != std::string::npos) ? particleEffectFile.substr(pos + 1) : ""; XML::Document doc(particleEffectFile.substr(0, pos)); - const XmlNodePtr rootNode = doc.rootNode(); + const XmlNodePtrConst rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "effect")) { diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp index 13f9d8d41..27f01d4e1 100644 --- a/src/particle/particleemitter.cpp +++ b/src/particle/particleemitter.cpp @@ -43,7 +43,7 @@ static const float DEG_RAD_FACTOR = 0.017453293F; typedef std::vector<ImageSet*>::const_iterator ImageSetVectorCIter; typedef std::list<ParticleEmitter>::const_iterator ParticleEmitterListCIter; -ParticleEmitter::ParticleEmitter(const XmlNodePtr emitterNode, +ParticleEmitter::ParticleEmitter(const XmlNodePtrConst emitterNode, Particle *const target, Map *const map, const int rotation, const std::string& dyePalettes) : @@ -425,7 +425,7 @@ ParticleEmitter::ParticleEmitter(const ParticleEmitter &o) *this = o; } -ImageSet *ParticleEmitter::getImageSet(XmlNodePtr node) +ImageSet *ParticleEmitter::getImageSet(XmlNodePtrConst node) { ResourceManager *const resman = ResourceManager::getInstance(); ImageSet *imageset = nullptr; @@ -525,7 +525,7 @@ ParticleEmitter::~ParticleEmitter() } template <typename T> ParticleEmitterProp<T> -ParticleEmitter::readParticleEmitterProp(XmlNodePtr propertyNode, T def) +ParticleEmitter::readParticleEmitterProp(XmlNodePtrConst propertyNode, T def) { ParticleEmitterProp<T> retval; diff --git a/src/particle/particleemitter.h b/src/particle/particleemitter.h index bf0e05ae5..9e149034f 100644 --- a/src/particle/particleemitter.h +++ b/src/particle/particleemitter.h @@ -43,8 +43,10 @@ class Particle; class ParticleEmitter final { public: - ParticleEmitter(const XmlNodePtr emitterNode, Particle *const target, - Map *const map, const int rotation = 0, + ParticleEmitter(const XmlNodePtrConst emitterNode, + Particle *const target, + Map *const map, + const int rotation = 0, const std::string& dyePalettes = std::string()); /** @@ -82,9 +84,9 @@ class ParticleEmitter final private: template <typename T> ParticleEmitterProp<T> - readParticleEmitterProp(XmlNodePtr propertyNode, T def); + readParticleEmitterProp(XmlNodePtrConst propertyNode, T def); - ImageSet *getImageSet(XmlNodePtr node); + ImageSet *getImageSet(XmlNodePtrConst node); /** * initial position of particles: |