diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-08-09 09:48:11 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-08-11 11:07:54 +0200 |
| commit | bd6400ca442b1ee2d4deb6fede68c00e70999d9e (patch) | |
| tree | 1e55165b343596fd10c758c92f9c050398223a41 /editor/vobj-editor.cpp | |
| parent | 601915244264ed265c1ca1808a6bb2842cab2286 (diff) | |
editor: now use bptr<object>::destroy()
Diffstat (limited to 'editor/vobj-editor.cpp')
| -rw-r--r-- | editor/vobj-editor.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/editor/vobj-editor.cpp b/editor/vobj-editor.cpp index c95af843..4c2828e1 100644 --- a/editor/vobj-editor.cpp +++ b/editor/vobj-editor.cpp @@ -54,13 +54,15 @@ start: { for (auto i = (int)(es.size()-1); i >= 0; i--) { - const auto eʹ = es[i]; - if (eʹ->id == id && eʹ->is_virtual()) + auto eʹ = es[i]; + auto& e = *eʹ; + if (e.id == id && eʹ->is_virtual()) { - eʹ->destroy_script_pre(eʹ, script_destroy_reason::kill); + e.destroy_script_pre(eʹ, script_destroy_reason::kill); c.remove_object((unsigned)i); - eʹ->destroy_script_post(); - eʹ->gone = true; + e.destroy_script_post(); + e.gone = true; + eʹ.destroy(); goto start; } } |
