From 33a987368e577c117bff53c240b9a3167a981056 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 3 Nov 2020 19:01:53 +0000 Subject: Replace ConfigTag::create with a public constructor. --- src/users.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 9be5cdada..e8c0e4c56 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1239,9 +1239,7 @@ ConnectClass::ConnectClass(std::shared_ptr tag, char t, const std::st // Connect classes can inherit from each other but this is problematic for modules which can't use // ConnectClass::Update so we build a hybrid tag containing all of the values set on this class as // well as the parent class. - ConfigTag::Items* items; - config = ConfigTag::create(tag->tag, tag->src_name, tag->src_line, items); - + config = std::make_shared(tag->tag, tag->src_name, tag->src_line); for (const auto& [key, value] : parent->config->GetItems()) { // The class name and parent name are not inherited @@ -1250,13 +1248,13 @@ ConnectClass::ConnectClass(std::shared_ptr tag, char t, const std::st // Store the item in the config tag. If this item also // exists in the child it will be overwritten. - (*items)[key] = value; + config->GetItems()[key] = value; } for (const auto& [key, value] : tag->GetItems()) { // This will overwrite the parent value if present. - (*items)[key] = value; + config->GetItems()[key] = value; } } -- cgit v1.3.1-10-gc9f91