summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-01 18:10:37 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-01 18:10:37 +0100
commitd8df3fb6e7e824c358cd20edfe83c4eff5cfd9da (patch)
treef8374faa2bc6085c4d5600afc0744eef9c974570 /src
parent310d7d2639ebc6ecba0e3367a401595e1e8f974b (diff)
src: RTree::Remove() return value doesn't work actually
Diffstat (limited to 'src')
-rw-r--r--src/RTree.h2
-rw-r--r--src/RTree.hpp4
-rw-r--r--src/chunk-collision.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/RTree.h b/src/RTree.h
index 0f735ef8..04d84863 100644
--- a/src/RTree.h
+++ b/src/RTree.h
@@ -78,7 +78,7 @@ public:
/// \param a_min Min of bounding rect
/// \param a_max Max of bounding rect
/// \param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed.
- bool Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId);
+ void Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId);
/// Find all within search rectangle
/// \param a_min Min of search bounding rect
diff --git a/src/RTree.hpp b/src/RTree.hpp
index 4c0faf6e..12b55157 100644
--- a/src/RTree.hpp
+++ b/src/RTree.hpp
@@ -185,7 +185,7 @@ void RTREE_QUAL::Insert(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMD
RTREE_TEMPLATE
-bool RTREE_QUAL::Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId)
+void RTREE_QUAL::Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId)
{
#ifdef _DEBUG
for(int index=0; index<NUMDIMS; ++index)
@@ -202,7 +202,7 @@ bool RTREE_QUAL::Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMD
rect.m_max[axis] = a_max[axis];
}
- return !RemoveRect(&rect, a_dataId, &m_root);
+ RemoveRect(&rect, a_dataId, &m_root);
}
diff --git a/src/chunk-collision.cpp b/src/chunk-collision.cpp
index bd761b03..3e10ea75 100644
--- a/src/chunk-collision.cpp
+++ b/src/chunk-collision.cpp
@@ -112,7 +112,7 @@ bool chunk::_bbox_for_scenery(std::size_t i, bbox& value) noexcept
void chunk::_remove_bbox(const bbox& x)
{
auto start = Vector2(x.start), end = Vector2(x.end);
- fm_assert(_rtree.Remove(start.data(), end.data(), x.id));
+ _rtree.Remove(start.data(), end.data(), x.id);
}
void chunk::_add_bbox(const bbox& x)