MXS-2304 Remove additional module parameter classes

Equivalent functionality is now in the basic config parameter class.
This commit is contained in:
Esa Korhonen
2019-02-14 18:24:39 +02:00
parent bd3d5bb010
commit 9fbaafea91
12 changed files with 77 additions and 273 deletions

View File

@ -119,26 +119,13 @@ public:
{
for (const auto& elem : parameters)
{
// Allocate and add new head element.
MXS_CONFIG_PARAMETER* new_elem =
static_cast<MXS_CONFIG_PARAMETER*>(MXS_MALLOC(sizeof(MXS_CONFIG_PARAMETER)));
new_elem->name = MXS_STRDUP(elem.name.c_str());
new_elem->value = MXS_STRDUP(elem.value.c_str());
new_elem->next = m_params;
m_params = new_elem;
MXS_CONFIG_PARAMETER::set(&m_params, elem.name, elem.value);
}
}
~ParamAdaptor()
{
while (m_params)
{
auto elem = m_params;
m_params = elem->next;
MXS_FREE(elem->name);
MXS_FREE(elem->value);
MXS_FREE(elem);
}
MXS_CONFIG_PARAMETER::free_all(&m_params);
}
operator MXS_CONFIG_PARAMETER*()