Use std::enable_shared_from_this instead of thisP parameters.

This commit is contained in:
Twan van Laarhoven
2020-05-06 22:59:10 +02:00
parent b4435e5e57
commit e005d47d56
20 changed files with 114 additions and 118 deletions
+2 -2
View File
@@ -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<Style>(Reader&) {
throw InternalError(_("IndexMap contains nullptr StyleP the application should have crashed already"));
@@ -290,7 +290,7 @@ void Value::updateSortValue(Context& ctx) {
void init_object(const FieldP& field, ValueP& value) {
if (!value)
value = field->newValue(field);
value = field->newValue();
}
template <> ValueP read_new<Value>(Reader&) {
throw InternalError(_("IndexMap contains nullptr ValueP the application should have crashed already"));