MXS-2304 Use values instead of pointers in CONFIG_CONTEXT

Simplifies ctor/dtor.
This commit is contained in:
Esa Korhonen
2019-02-19 13:35:22 +02:00
parent 5828c93112
commit 3fa4a85a1e
8 changed files with 143 additions and 178 deletions

View File

@ -400,14 +400,17 @@ private:
class CONFIG_CONTEXT
{
public:
CONFIG_CONTEXT();
CONFIG_CONTEXT(const std::string& section);
~CONFIG_CONTEXT();
CONFIG_CONTEXT(const std::string& section = "");
char* object; /**< The name of the object being configured */
MXS_CONFIG_PARAMETER* parameters; /**< The list of parameter values */
std::string name; /**< The name of the object being configured */
MXS_CONFIG_PARAMETER parameters; /**< The list of parameter values */
bool was_persisted; /**< True if this object was persisted */
CONFIG_CONTEXT* next; /**< Next pointer in the linked list */
const char* object() const
{
return name.c_str();
}
};
/**