summaryrefslogtreecommitdiffhomepage
path: root/src/RTree.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-05 11:41:54 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-06 03:51:59 +0100
commitdf14ff353f4a3ebe53faab97d22134c3d24825c2 (patch)
tree8bfe719bafaff2dab534695dfc1c7882727c7e8f /src/RTree.hpp
parent871d777ba06c2ad7d8a9d71bb4a27ad9860f327a (diff)
src/rtree: remove <algorithm> usage
Diffstat (limited to 'src/RTree.hpp')
-rw-r--r--src/RTree.hpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/RTree.hpp b/src/RTree.hpp
index 7820ddd7..3ac1bde1 100644
--- a/src/RTree.hpp
+++ b/src/RTree.hpp
@@ -5,9 +5,10 @@
#include <cmath>
#include <cstddef>
-#include <algorithm>
+#include <Corrade/Containers/ArrayView.h>
#include <Corrade/Containers/GrowableArray.h>
#include <Corrade/Utility/Math.h>
+#include <Corrade/Utility/Algorithms.h>
#ifdef __GNUG__
#pragma GCC diagnostic push
@@ -348,13 +349,11 @@ void RTREE_QUAL::CopyRec(Node* current, Node* other)
Branch* currentBranch = &current->m_branch[index];
Branch* otherBranch = &other->m_branch[index];
- std::copy(otherBranch->m_rect.m_min,
- otherBranch->m_rect.m_min + NUMDIMS,
- currentBranch->m_rect.m_min);
+ Corrade::Utility::copy({otherBranch->m_rect.m_min, NUMDIMS},
+ currentBranch->m_rect.m_min);
- std::copy(otherBranch->m_rect.m_max,
- otherBranch->m_rect.m_max + NUMDIMS,
- currentBranch->m_rect.m_max);
+ Corrade::Utility::copy({otherBranch->m_rect.m_max, NUMDIMS},
+ currentBranch->m_rect.m_max);
currentBranch->m_child = AllocNode();
CopyRec(currentBranch->m_child, otherBranch->m_child);
@@ -367,13 +366,11 @@ void RTREE_QUAL::CopyRec(Node* current, Node* other)
Branch* currentBranch = &current->m_branch[index];
Branch* otherBranch = &other->m_branch[index];
- std::copy(otherBranch->m_rect.m_min,
- otherBranch->m_rect.m_min + NUMDIMS,
- currentBranch->m_rect.m_min);
+ Corrade::Utility::copy({otherBranch->m_rect.m_min, NUMDIMS},
+ currentBranch->m_rect.m_min);
- std::copy(otherBranch->m_rect.m_max,
- otherBranch->m_rect.m_max + NUMDIMS,
- currentBranch->m_rect.m_max);
+ Corrade::Utility::copy({otherBranch->m_rect.m_max, NUMDIMS},
+ currentBranch->m_rect.m_max);
currentBranch->m_data = otherBranch->m_data;
}