From ce1e52baef326dc4ca961535e656cadea5d4135c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 28 Aug 2024 17:35:38 +0200 Subject: [PATCH] d --- src/chunk-collision.cpp | 2 +- src/chunk-walls.cpp | 1 - src/chunk.hpp | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/chunk-collision.cpp b/src/chunk-collision.cpp index 78e11047..6b266543 100644 --- a/src/chunk-collision.cpp +++ b/src/chunk-collision.cpp @@ -101,7 +101,7 @@ void filter_through_holes(Chunk_RTree& rtree, object_id id, Vector2 min, Vector2 } // namespace #if 1 -bool chunk::find_hole_in_bbox(CutResult::rect& hole, Chunk_RTree& rtree, Vector2 min, Vector2 max) +bool chunk::find_hole_in_bbox(CutResult::rect& hole, const Chunk_RTree& rtree, Vector2 min, Vector2 max) { bool ret = true; rtree.Search(min.data(), max.data(), [&](uint64_t data, const Chunk_RTree::Rect& r) { diff --git a/src/chunk-walls.cpp b/src/chunk-walls.cpp index 14249671..35998c63 100644 --- a/src/chunk-walls.cpp +++ b/src/chunk-walls.cpp @@ -5,7 +5,6 @@ #include "shaders/shader.hpp" #include #include -#include #include #include #include diff --git a/src/chunk.hpp b/src/chunk.hpp index 335d3440..f49a9653 100644 --- a/src/chunk.hpp +++ b/src/chunk.hpp @@ -4,7 +4,6 @@ #include "local-coords.hpp" #include "src/RTree-fwd.h" #include "global-coords.hpp" -#include "wall-defs.hpp" #include "search-pred.hpp" #include "hole-cut.hpp" #include @@ -98,7 +97,7 @@ class chunk final [[nodiscard]] bool can_place_object(const object_proto& proto, local_coords pos); [[nodiscard]] bool find_hole_in_bbox(CutResult::rect& hole, Vector2 min, Vector2 max); - [[nodiscard]] static bool find_hole_in_bbox(CutResult::rect& hole, Chunk_RTree& rtree, Vector2 min, Vector2 max); + [[nodiscard]] static bool find_hole_in_bbox(CutResult::rect& hole, const Chunk_RTree& rtree, Vector2 min, Vector2 max); void on_teardown(); bool is_teardown() const;