From 311c175f3184103950c72bc5c775174597430b83 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Jul 2017 01:31:22 +0300 Subject: 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. --- src/particle/particle.cpp | 4 ++-- src/particle/particleemitter.cpp | 4 ++-- src/particle/particleemitter.h | 4 ++-- src/particle/particleinfo.h | 4 ++-- src/particle/particlevector.cpp | 4 ++-- src/particle/particlevector.h | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/particle') 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 newParticles; + STD_VECTOR newParticles; (*e)->createParticles(mLifetimePast, newParticles); - FOR_EACH (std::vector::const_iterator, + FOR_EACH (STD_VECTOR::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::const_iterator ImageSetVectorCIter; +typedef STD_VECTOR::const_iterator ImageSetVectorCIter; typedef std::list::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 &newParticles) + STD_VECTOR &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 &newParticles); + STD_VECTOR &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 mParticleChildEmitters; - std::vector mTempSets; + STD_VECTOR 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 files; - std::vector particles; + STD_VECTOR files; + STD_VECTOR 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::iterator it = mIndexedElements.begin(); + for (STD_VECTOR::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::const_iterator it = mIndexedElements.begin(); + for (STD_VECTOR::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 mIndexedElements; + STD_VECTOR mIndexedElements; }; #endif // PARTICLE_PARTICLEVECTOR_H -- cgit v1.2.3-60-g2f50