aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-11-03 19:01:53 +0000
committerGravatar Sadie Powell2020-11-03 19:54:13 +0000
commit33a987368e577c117bff53c240b9a3167a981056 (patch)
treeb015b1cffb0c829234ebb97112bf61825d78b8bc /src/users.cpp
parentRename ConfigItems to ConfigTag::Items. (diff)
downloadinspircd++-33a987368e577c117bff53c240b9a3167a981056.tar.gz
inspircd++-33a987368e577c117bff53c240b9a3167a981056.tar.bz2
inspircd++-33a987368e577c117bff53c240b9a3167a981056.zip
Replace ConfigTag::create with a public constructor.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp8
1 files changed, 3 insertions, 5 deletions
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<ConfigTag> 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<ConfigTag>(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<ConfigTag> 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;
}
}