From e005d47d563f5bd1b34184c0e887a4c2f150d31d Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Wed, 6 May 2020 22:59:10 +0200 Subject: [PATCH] Use std::enable_shared_from_this instead of thisP parameters. --- src/data/field.cpp | 4 +-- src/data/field.hpp | 51 ++++++++++++++++----------------- src/gfx/generated_image.cpp | 4 +-- src/gfx/generated_image.hpp | 4 +-- src/gui/control/card_editor.cpp | 2 +- src/gui/set/console_panel.cpp | 2 +- src/gui/value/choice.cpp | 2 +- src/gui/value/editor.hpp | 5 ++-- src/render/card/viewer.cpp | 2 +- src/render/value/viewer.hpp | 7 ++--- src/script/context.cpp | 2 +- src/script/dependency.cpp | 6 ++-- src/script/functions/export.cpp | 2 +- src/script/functions/image.cpp | 4 --- src/script/image.cpp | 9 +----- src/script/image.hpp | 3 -- src/script/to_value.hpp | 23 ++++++++------- src/script/value.cpp | 45 +++++++++++++++++------------ src/script/value.hpp | 7 ++--- src/util/smart_ptr.hpp | 48 +++++++++++++++++++------------ 20 files changed, 114 insertions(+), 118 deletions(-) diff --git a/src/data/field.cpp b/src/data/field.cpp index 6a191b26..3c4b30ca 100644 --- a/src/data/field.cpp +++ b/src/data/field.cpp @@ -125,7 +125,7 @@ IMPLEMENT_REFLECTION(Style) { } void init_object(const FieldP& field, StyleP& style) { - if (!style) style = field->newStyle(field); + if (!style) style = field->newStyle(); } template <> StyleP read_new