diff --git a/engine/src/gfx/particle.cpp b/engine/src/gfx/particle.cpp index 8466045e6c..64c5181727 100644 --- a/engine/src/gfx/particle.cpp +++ b/engine/src/gfx/particle.cpp @@ -76,9 +76,9 @@ void ParticleTrail::ChangeMax( unsigned int max ) -static inline void UpdateColor( std::vector< QVector, aligned_allocator > &vloc, - const std::vector< Vector, aligned_allocator > &vvel, - std::vector< GFXColor, aligned_allocator > &vcol, +static inline void UpdateColor( std::vector< QVector > &vloc, + const std::vector< Vector > &vvel, + std::vector< GFXColor > &vcol, const GFXColor& fadetime, const float time ) { @@ -284,7 +284,7 @@ void ParticleTrail::DrawAndUpdate() // Must sort distances.clear(); distances.reserve(nparticles); - { for (std::vector >::const_iterator it = particleLoc.begin(); it != particleLoc.end(); ++it) { + { for (auto it = particleLoc.begin(); it != particleLoc.end(); ++it) { distances.push_back((campos - *it).MagnitudeSquared()); } } IndexCompare dcomp(distances); @@ -362,15 +362,15 @@ void ParticleTrail::DrawAndUpdate() } // Remove dead particles anywhere - vector< Vector, aligned_allocator >::iterator v = particleVel.begin(); - vector< QVector, aligned_allocator >::iterator loc = particleLoc.begin(); - vector< GFXColor, aligned_allocator >::iterator col = particleColor.begin(); + auto v = particleVel.begin(); + auto loc = particleLoc.begin(); + auto col = particleColor.begin(); auto sz = particleSize.begin(); while ( col != particleColor.end() ) { if ( !(col->a > minalpha) ) { - vector< Vector, aligned_allocator >::iterator vlast = particleVel.end() - 1; - vector< QVector, aligned_allocator >::iterator loclast = particleLoc.end() - 1; - vector< GFXColor, aligned_allocator >::iterator collast = particleColor.end() - 1; + auto vlast = particleVel.end() - 1; + auto loclast = particleLoc.end() - 1; + auto collast = particleColor.end() - 1; auto szlast = particleSize.end() - 1; if (col != collast) { *v = *vlast; @@ -403,9 +403,9 @@ void ParticleTrail::AddParticle( const ParticlePoint &P, const Vector &V, float return; if (particleLoc.size() > maxparticles) { - vector< Vector, aligned_allocator >::iterator vel = particleVel.begin(); - vector< QVector, aligned_allocator >::iterator loc = particleLoc.begin(); - vector< GFXColor, aligned_allocator >::iterator col = particleColor.begin(); + auto vel = particleVel.begin(); + auto loc = particleLoc.begin(); + auto col = particleColor.begin(); auto sz = particleSize.begin(); size_t off = ( (size_t) rand() ) % particleLoc.size(); vel += off; diff --git a/engine/src/gfx/particle.h b/engine/src/gfx/particle.h index 199ccb953e..85e68fdef8 100644 --- a/engine/src/gfx/particle.h +++ b/engine/src/gfx/particle.h @@ -50,9 +50,9 @@ struct ParticlePoint */ class ParticleTrail { - std::vector< Vector, aligned_allocator > particleVel; - std::vector< QVector, aligned_allocator > particleLoc; - std::vector< GFXColor, aligned_allocator > particleColor; + std::vector< Vector > particleVel; + std::vector< QVector > particleLoc; + std::vector< GFXColor > particleColor; std::vector< float > particleSize; std::vector< float > particleVert; std::vector< float > distances;