From aa9add0ffc514a3d0bc16b76e4b0c0c369101df9 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Wed, 9 Oct 2019 10:13:26 +0100 Subject: [PATCH] Switch back to std::map to support wider range of compilers. --- src/AABB.cc | 10 +++++----- src/AABB.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/AABB.cc b/src/AABB.cc index 612746b..75ba2fe 100644 --- a/src/AABB.cc +++ b/src/AABB.cc @@ -379,7 +379,7 @@ namespace aabb insertLeaf(node); // Add the new particle to the map. - particleMap.insert(std::unordered_map::value_type(particle, node)); + particleMap.insert(std::map::value_type(particle, node)); // Store the particle index. nodes[node].particle = particle; @@ -435,7 +435,7 @@ namespace aabb insertLeaf(node); // Add the new particle to the map. - particleMap.insert(std::unordered_map::value_type(particle, node)); + particleMap.insert(std::map::value_type(particle, node)); // Store the particle index. nodes[node].particle = particle; @@ -449,7 +449,7 @@ namespace aabb void Tree::removeParticle(unsigned int particle) { // Map iterator. - std::unordered_map::iterator it; + std::map::iterator it; // Find the particle. it = particleMap.find(particle); @@ -476,7 +476,7 @@ namespace aabb void Tree::removeAll() { // Iterator pointing to the start of the particle map. - std::unordered_map::iterator it = particleMap.begin(); + std::map::iterator it = particleMap.begin(); // Iterate over the map. while (it != particleMap.end()) @@ -531,7 +531,7 @@ namespace aabb } // Map iterator. - std::unordered_map::iterator it; + std::map::iterator it; // Find the particle. it = particleMap.find(particle); diff --git a/src/AABB.h b/src/AABB.h index 3c3b8b9..9c9f4ce 100644 --- a/src/AABB.h +++ b/src/AABB.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include /// Null node flag. @@ -416,7 +416,7 @@ namespace aabb std::vector posMinImage; /// A map between particle and node indices. - std::unordered_map particleMap; + std::map particleMap; /// Does touching count as overlapping in tree queries? bool touchIsOverlap;