diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-03 09:42:29 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-03 09:42:29 +0200 |
commit | d66c591ce8bf7b41e6eb6566a6fdd6f1019f7b57 (patch) | |
tree | 71085e9782f7b5a86752fd753cbda9b3b8eb31da /src | |
parent | 6538c66308b98bc0f9875355b1247502aff7c07c (diff) |
critter_script shouldn't have a copy ctor
Diffstat (limited to 'src')
-rw-r--r-- | src/critter-script.cpp | 7 | ||||
-rw-r--r-- | src/critter-script.hpp | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/critter-script.cpp b/src/critter-script.cpp index a10694fd..9ab58aae 100644 --- a/src/critter-script.cpp +++ b/src/critter-script.cpp @@ -26,7 +26,7 @@ struct empty_critter_script final : critter_script void delete_self() noexcept override; }; -empty_critter_script::empty_critter_script() : critter_script{nullptr} {} +empty_critter_script::empty_critter_script() : critter_script{} {} void empty_critter_script::on_init(const std::shared_ptr<critter>& p) { DBG_nospace << "> init critter:" << (void*)&*p << " id:" << p->id << (p->name ? " name:" : "") << p->name; @@ -57,9 +57,8 @@ critter_script* Script<critter_script, critter>::make_empty() return &empty_script_; } -critter_script::critter_script(const std::shared_ptr<critter>&) {} -critter_script::~critter_script() noexcept {} - template class Script<critter_script, critter>; +critter_script::~critter_script() noexcept = default; + } // namespace floormat diff --git a/src/critter-script.hpp b/src/critter-script.hpp index 629d9d1b..934e9154 100644 --- a/src/critter-script.hpp +++ b/src/critter-script.hpp @@ -9,7 +9,6 @@ struct Ns; struct critter_script : base_script { - critter_script(const std::shared_ptr<critter>& c); ~critter_script() noexcept override; virtual void on_init(const std::shared_ptr<critter>& c) = 0; |