diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/critter-script.cpp | 2 | ||||
-rw-r--r-- | src/object.hpp | 1 | ||||
-rw-r--r-- | src/script.hpp | 3 | ||||
-rw-r--r-- | src/world.cpp | 2 | ||||
-rw-r--r-- | src/world.hpp | 2 |
5 files changed, 7 insertions, 3 deletions
diff --git a/src/critter-script.cpp b/src/critter-script.cpp index 5b9efbfa..7b80234f 100644 --- a/src/critter-script.cpp +++ b/src/critter-script.cpp @@ -44,7 +44,7 @@ void empty_critter_script::on_destroy(const std::shared_ptr<critter>& p, script_ } void empty_critter_script::delete_self() noexcept { - DBG_nospace << "> delete critter:"; + DBG_nospace << "> delete critter"; } empty_critter_script empty_script_ = {}; diff --git a/src/object.hpp b/src/object.hpp index e1582419..9d842572 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -42,6 +42,7 @@ struct object_proto struct object { fm_DECLARE_DELETED_COPY_ASSIGNMENT(object); + fm_DECLARE_DELETED_MOVE_ASSIGNMENT(object); const object_id id = 0; uint64_t last_frame_no = 0; diff --git a/src/script.hpp b/src/script.hpp index bb403eda..c37cf448 100644 --- a/src/script.hpp +++ b/src/script.hpp @@ -39,6 +39,9 @@ class Script final void _assert_state(script_lifecycle s, const char* file, int line); public: + fm_DECLARE_DELETED_COPY_ASSIGNMENT(Script); + fm_DECLARE_DELETED_MOVE_ASSIGNMENT(Script); + Script(); ~Script() noexcept; diff --git a/src/world.cpp b/src/world.cpp index dd6f2ca7..e3fae3c3 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -158,7 +158,7 @@ void world::collect(bool force) void world::do_make_object(const std::shared_ptr<object>& e, global_coords pos, bool sorted) { - fm_debug_assert(e->id != 0); // todo! add fm_debug2_assert() + fm_debug_assert(e->id != 0); fm_debug_assert(e->c); fm_debug_assert(pos.chunk3() == e->c->coord()); fm_debug_assert(_unique_id && e->c->world()._unique_id == _unique_id); diff --git a/src/world.hpp b/src/world.hpp index 52cb1f64..78fdd690 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -86,7 +86,7 @@ public: T{object_id(), c, std::declval<Xs&&>()...}; std::is_base_of_v<object, T>; } - std::shared_ptr<T> make_object(object_id id, global_coords pos, Xs&&... xs) // todo! replace 2nd arg with chunk& + std::shared_ptr<T> make_object(object_id id, global_coords pos, Xs&&... xs) { auto ret = std::shared_ptr<T>(new T{id, operator[](pos.chunk3()), forward<Xs>(xs)...}); do_make_object(std::static_pointer_cast<object>(ret), pos, sorted); |