diff options
Diffstat (limited to 'editor/tests')
-rw-r--r-- | editor/tests/hole-test.cpp | 1 | ||||
-rw-r--r-- | editor/tests/path-test.cpp | 5 | ||||
-rw-r--r-- | editor/tests/raycast-test.cpp | 4 | ||||
-rw-r--r-- | editor/tests/region-test.cpp | 3 | ||||
-rw-r--r-- | editor/tests/walk-test.cpp | 6 |
5 files changed, 9 insertions, 10 deletions
diff --git a/editor/tests/hole-test.cpp b/editor/tests/hole-test.cpp index 7b6041b2..b419f7e8 100644 --- a/editor/tests/hole-test.cpp +++ b/editor/tests/hole-test.cpp @@ -1,5 +1,4 @@ #include "../tests-private.hpp" -#include "compat/shared-ptr-wrapper.hpp" #include "src/tile-constants.hpp" #include "src/chunk-region.hpp" #include "src/hole.hpp" diff --git a/editor/tests/path-test.cpp b/editor/tests/path-test.cpp index 63b59dd4..4b82af68 100644 --- a/editor/tests/path-test.cpp +++ b/editor/tests/path-test.cpp @@ -1,14 +1,15 @@ #include "../tests-private.hpp" #include "../app.hpp" #include "compat/array-size.hpp" -#include "compat/shared-ptr-wrapper.hpp" #include "compat/vector-wrapper.hpp" +#include "compat/borrowed-ptr.inl" #include "floormat/main.hpp" #include "src/search-astar.hpp" #include "src/search-result.hpp" #include "src/critter.hpp" #include "shaders/shader.hpp" #include "../imgui-raii.hpp" +#include <cstdio> #include <cr/Optional.h> #include <mg/Functions.h> #include <mg/Color.h> @@ -59,7 +60,7 @@ bool path_test::handle_mouse_click(app& a, const mouse_button_event& e, bool is_ case mouse_button_left: { auto& M = a.main(); auto& w = M.world(); - auto C = a.ensure_player_character(w).ptr; + auto C = a.ensure_player_character(w); if (auto pt = a.cursor_state().point()) { constexpr auto chunk_size = iTILE_SIZE2 * TILE_MAX_DIM; diff --git a/editor/tests/raycast-test.cpp b/editor/tests/raycast-test.cpp index 6596303f..07b44eaf 100644 --- a/editor/tests/raycast-test.cpp +++ b/editor/tests/raycast-test.cpp @@ -2,12 +2,12 @@ #include "editor/app.hpp" #include "floormat/main.hpp" #include "compat/array-size.hpp" -#include "compat/shared-ptr-wrapper.hpp" #include "../imgui-raii.hpp" #include "src/critter.hpp" #include "src/world.hpp" #include "src/raycast-diag.hpp" #include <cinttypes> +#include <cstdio> #include <array> #include <vector> #include <mg/Color.h> @@ -73,7 +73,7 @@ struct raycast_test final : base_test auto& w = M.world(); if (auto pt_ = a.cursor_state().point()) { - auto C = a.ensure_player_character(w).ptr; + auto C = a.ensure_player_character(w); auto pt0 = C->position(); pending = { .from = pt0, .to = *pt_, .self = C->id, .exists = true, }; return true; diff --git a/editor/tests/region-test.cpp b/editor/tests/region-test.cpp index 1206b1eb..0c51bf8a 100644 --- a/editor/tests/region-test.cpp +++ b/editor/tests/region-test.cpp @@ -1,5 +1,4 @@ #include "../tests-private.hpp" -#include "compat/shared-ptr-wrapper.hpp" #include "src/tile-constants.hpp" #include "src/chunk-region.hpp" #include "src/object.hpp" @@ -153,7 +152,7 @@ void region_test::do_region_extraction(app& a, chunk_coords_ coord) { auto& M = a.main(); auto& w = M.world(); - auto C = a.ensure_player_character(w).ptr; + auto C = a.ensure_player_character(w); if (auto* c = w.at(coord)) { auto C_coord = Vector2i{ Vector2i(C->coord.local()) * iTILE_SIZE2 + Vector2i(C->offset) }; diff --git a/editor/tests/walk-test.cpp b/editor/tests/walk-test.cpp index a317928f..f04fc869 100644 --- a/editor/tests/walk-test.cpp +++ b/editor/tests/walk-test.cpp @@ -1,5 +1,4 @@ #include "../tests-private.hpp" -#include "compat/shared-ptr-wrapper.hpp" #include "editor/app.hpp" #include "src/critter.hpp" #include "src/critter-script.hpp" @@ -8,6 +7,7 @@ #include "floormat/main.hpp" #include "../imgui-raii.hpp" #include "src/search-astar.hpp" +#include "compat/borrowed-ptr.inl" #include <mg/Functions.h> namespace floormat::tests { @@ -43,7 +43,7 @@ bool pf_test::handle_mouse_click(app& a, const mouse_button_event& e, bool is_do { if (auto ptʹ = a.cursor_state().point()) { - auto C = a.ensure_player_character(m.world()).ptr; + auto C = a.ensure_player_character(m.world()); fm_assert(C->is_dynamic()); constexpr auto chunk_size = iTILE_SIZE2 * TILE_MAX_DIM; @@ -63,7 +63,7 @@ bool pf_test::handle_mouse_click(app& a, const mouse_button_event& e, bool is_do } else if (e.button == mouse_button_right && is_down) { - auto C = a.ensure_player_character(m.world()).ptr; + auto C = a.ensure_player_character(m.world()); C->script.do_clear(C); } return false; |