From f7243dcde71f1d777ab4cef697d4f30455256055 Mon Sep 17 00:00:00 2001 From: Benjamen Meyer Date: Mon, 30 Oct 2023 00:40:03 -0400 Subject: [PATCH] Bug Fix: ManjaroLinux - Builds There is no need to specify the alignment allocator which can only be used by complex types. The GFXColor and QVector types are not sufficiently complex to support it; the Vector type probably is not as well. For now at least, just use `auto` for the iterators --- engine/src/gfx/particle.cpp | 26 +++++++++++++------------- engine/src/gfx/particle.h | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) 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;