summaryrefslogtreecommitdiffhomepage
path: root/src/chunk.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-01-15 13:46:16 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-01-15 13:46:16 +0100
commita5acc700d6a3a9b050864cf78a0f9f2305babdff (patch)
treeed3c0a02b51e19b14f92535b9640673cae84f8ac /src/chunk.hpp
parente850be48828ce9cf4767b88707495257c98e88b0 (diff)
b
Diffstat (limited to 'src/chunk.hpp')
-rw-r--r--src/chunk.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/chunk.hpp b/src/chunk.hpp
index ff0f589e..56afb6a5 100644
--- a/src/chunk.hpp
+++ b/src/chunk.hpp
@@ -8,6 +8,7 @@
#include <type_traits>
#include <array>
#include <vector>
+#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Pointer.h>
#include <Magnum/GL/Mesh.h>
@@ -123,7 +124,7 @@ struct chunk final
void add_object_unsorted(const std::shared_ptr<object>& e);
void sort_objects();
void remove_object(size_t i);
- const std::vector<std::shared_ptr<object>>& objects() const;
+ ArrayView<const std::shared_ptr<object>> objects() const;
// for drawing only
static constexpr size_t max_wall_quad_count =
@@ -146,7 +147,7 @@ private:
Pointer<ground_stuff> _ground;
Pointer<wall_stuff> _walls;
- std::vector<std::shared_ptr<object>> _objects;
+ Array<std::shared_ptr<object>> _objects;
class world* _world;
GL::Mesh ground_mesh{NoCreate}, wall_mesh{NoCreate}, scenery_mesh{NoCreate};
RTree _rtree;