summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/critter.cpp6
-rw-r--r--test/loader.cpp1
-rw-r--r--test/save.cpp2
3 files changed, 5 insertions, 4 deletions
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<Ns() const>& 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<generic_scenery>(objʹ);
+ const auto obj = static_pointer_cast<generic_scenery>(objʹ);
const auto obj2 = w.find_object<generic_scenery>(id);
//const auto obj3 = w.find_object<door_scenery>(id); // must fail
fm_assert(obj == obj2);