diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-14 01:31:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-14 01:31:22 +0300 |
commit | 311c175f3184103950c72bc5c775174597430b83 (patch) | |
tree | ad022dc44a1c4177b3d53bf0d7eaa5a1736c8cf1 /src/particle | |
parent | 16bcb81b0509725e4546bcb3c390ca3c1bb7e7b1 (diff) | |
download | mv-311c175f3184103950c72bc5c775174597430b83.tar.gz mv-311c175f3184103950c72bc5c775174597430b83.tar.bz2 mv-311c175f3184103950c72bc5c775174597430b83.tar.xz mv-311c175f3184103950c72bc5c775174597430b83.zip |
Replace std::vector into macro STD_VECTOR.
In most case it equal to std::vector except debug modes.
Now it can be also mse::mstd::vector, but sadly this class not support
all required features.
Diffstat (limited to 'src/particle')
-rw-r--r-- | src/particle/particle.cpp | 4 | ||||
-rw-r--r-- | src/particle/particleemitter.cpp | 4 | ||||
-rw-r--r-- | src/particle/particleemitter.h | 4 | ||||
-rw-r--r-- | src/particle/particleinfo.h | 4 | ||||
-rw-r--r-- | src/particle/particlevector.cpp | 4 | ||||
-rw-r--r-- | src/particle/particlevector.h | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 849464166..dd5b86913 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -218,9 +218,9 @@ void Particle::updateSelf() restrict2 { FOR_EACH (EmitterConstIterator, e, mChildEmitters) { - std::vector<Particle*> newParticles; + STD_VECTOR<Particle*> newParticles; (*e)->createParticles(mLifetimePast, newParticles); - FOR_EACH (std::vector<Particle*>::const_iterator, + FOR_EACH (STD_VECTOR<Particle*>::const_iterator, it, newParticles) { diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp index b13b03ca0..326daea7a 100644 --- a/src/particle/particleemitter.cpp +++ b/src/particle/particleemitter.cpp @@ -47,7 +47,7 @@ static const float SIN45 = 0.707106781F; static const float DEG_RAD_FACTOR = 0.017453293F; -typedef std::vector<ImageSet*>::const_iterator ImageSetVectorCIter; +typedef STD_VECTOR<ImageSet*>::const_iterator ImageSetVectorCIter; typedef std::list<ParticleEmitter>::const_iterator ParticleEmitterListCIter; ParticleEmitter::ParticleEmitter(XmlNodeConstPtrConst emitterNode, @@ -511,7 +511,7 @@ ParticleEmitter::readParticleEmitterProp(XmlNodePtrConst propertyNode, T def) } void ParticleEmitter::createParticles(const int tick, - std::vector<Particle*> &newParticles) + STD_VECTOR<Particle*> &newParticles) { if (mOutputPauseLeft > 0) { diff --git a/src/particle/particleemitter.h b/src/particle/particleemitter.h index 7164d3e1d..ec01b88df 100644 --- a/src/particle/particleemitter.h +++ b/src/particle/particleemitter.h @@ -71,7 +71,7 @@ class ParticleEmitter final * Spawns new particles */ void createParticles(const int tick, - std::vector<Particle*> &newParticles); + STD_VECTOR<Particle*> &newParticles); /** * Sets the target of the particles that are created @@ -161,7 +161,7 @@ class ParticleEmitter final // List of emitters the spawned particles are equipped with std::list<ParticleEmitter> mParticleChildEmitters; - std::vector<ImageSet*> mTempSets; + STD_VECTOR<ImageSet*> mTempSets; int mOutputPauseLeft; diff --git a/src/particle/particleinfo.h b/src/particle/particleinfo.h index 327d4b3d6..48129f553 100644 --- a/src/particle/particleinfo.h +++ b/src/particle/particleinfo.h @@ -35,8 +35,8 @@ struct ParticleInfo final A_DELETE_COPY(ParticleInfo) - std::vector<std::string> files; - std::vector<Particle*> particles; + STD_VECTOR<std::string> files; + STD_VECTOR<Particle*> particles; }; #endif // PARTICLE_PARTICLEINFO_H diff --git a/src/particle/particlevector.cpp b/src/particle/particlevector.cpp index ba8c0a0a7..8fba56244 100644 --- a/src/particle/particlevector.cpp +++ b/src/particle/particlevector.cpp @@ -79,7 +79,7 @@ void ParticleVector::moveTo(const float x, const float y) { ParticleContainer::moveTo(x, y); - for (std::vector<Particle *>::iterator it = mIndexedElements.begin(); + for (STD_VECTOR<Particle *>::iterator it = mIndexedElements.begin(); it != mIndexedElements.end(); ++it) { Particle *const p = *it; @@ -99,7 +99,7 @@ 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(); + for (STD_VECTOR<Particle *>::const_iterator it = mIndexedElements.begin(); it != mIndexedElements.end(); ++it) { if (*it != nullptr) diff --git a/src/particle/particlevector.h b/src/particle/particlevector.h index 27520d806..dce4ae156 100644 --- a/src/particle/particlevector.h +++ b/src/particle/particlevector.h @@ -65,7 +65,7 @@ class ParticleVector final : public ParticleContainer size_t usedSize() const; protected: - std::vector<Particle *> mIndexedElements; + STD_VECTOR<Particle *> mIndexedElements; }; #endif // PARTICLE_PARTICLEVECTOR_H |