From 47b9691f9bde62ea62f6601503997d93ed7ab64c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 16 Jul 2024 12:27:46 +0200 Subject: wa --- test/critter.cpp | 6 +++--- test/loader.cpp | 1 + test/save.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/critter.cpp b/test/critter.cpp index 071fae9b..90619ce8 100644 --- a/test/critter.cpp +++ b/test/critter.cpp @@ -1,7 +1,7 @@ #include "app.hpp" #include "compat/debug.hpp" -#include "compat/shared-ptr-wrapper.hpp" #include "compat/function2.hpp" +#include "compat/borrowed-ptr.inl" #include "src/critter.hpp" #include "src/scenery-proto.hpp" #include "src/world.hpp" @@ -118,7 +118,7 @@ bool run(world& w, const function_view& make_dt, mark_all_modified(w); object_id id = 0; - auto npc_ = w.ensure_player_character(id, make_proto((float)start.accel)).ptr; + auto npc_ = w.ensure_player_character(id, make_proto((float)start.accel)); auto& npc = *npc_; auto index = npc.index(); @@ -316,7 +316,7 @@ void test3(StringView instance_name, const Function& make_dt, double accel, rota { // reproduce the bug from commit 2b5a6e3f object_id id = 0; - auto npc = w.ensure_player_character(id, make_proto((float)accel)).ptr; + auto npc = w.ensure_player_character(id, make_proto((float)accel)); npc->set_bbox({}, {}, {1,1}, pass_mode::blocked); } diff --git a/test/loader.cpp b/test/loader.cpp index d551276f..c341da70 100644 --- a/test/loader.cpp +++ b/test/loader.cpp @@ -7,6 +7,7 @@ #include "src/wall-atlas.hpp" #include "src/anim-atlas.hpp" #include "src/scenery-proto.hpp" +#include "compat/borrowed-ptr.inl" namespace floormat { diff --git a/test/save.cpp b/test/save.cpp index 3d4a71a0..e30a02fb 100644 --- a/test/save.cpp +++ b/test/save.cpp @@ -292,7 +292,7 @@ void test_save_objs() constexpr auto coord = global_coords{ch, { 3, 4}}; const auto id = w.make_id(); const auto objʹ = w.make_scenery(id, coord, move(p)); - const auto obj = std::static_pointer_cast(objʹ); + const auto obj = static_pointer_cast(objʹ); const auto obj2 = w.find_object(id); //const auto obj3 = w.find_object(id); // must fail fm_assert(obj == obj2); -- cgit v1.2.3