MXS-2304 Move last config_get_x() functions inside class

This commit is contained in:
Esa Korhonen
2019-02-20 14:45:53 +02:00
parent 019c8fc2e1
commit 900cbb4cff
13 changed files with 127 additions and 139 deletions

View File

@ -40,7 +40,7 @@
#include <maxscale/server.hh>
#include <maxscale/service.hh>
#include <maxscale/utils.hh>
#include <maxscale/pcre2.h>
#include <maxscale/pcre2.hh>
#include <maxscale/routingworker.hh>
#include <binlog_common.hh>
@ -130,8 +130,8 @@ Avro::Avro(SERVICE* service, MXS_CONFIG_PARAMETER* params, SERVICE* source, SRow
, row_count(0)
, row_target(params->get_integer("group_rows"))
, task_handle(0)
, handler(service, handler, config_get_compiled_regex(params, "match", 0, NULL),
config_get_compiled_regex(params, "exclude", 0, NULL))
, handler(service, handler, params->get_compiled_regex("match", 0, NULL).release(),
params->get_compiled_regex("exclude", 0, NULL).release())
{
if (source)
{

View File

@ -22,7 +22,7 @@ Config::Config(MXS_CONFIG_PARAMETER* conf)
: refresh_min_interval(conf->get_integer("refresh_interval"))
, refresh_databases(conf->get_bool("refresh_databases"))
, debug(conf->get_bool("debug"))
, ignore_regex(config_get_compiled_regex(conf, "ignore_databases_regex", 0, NULL))
, ignore_regex(conf->get_compiled_regex("ignore_databases_regex", 0, NULL).release())
, ignore_match_data(ignore_regex ? pcre2_match_data_create_from_pattern(ignore_regex, NULL) : NULL)
, preferred_server(conf->get_server("preferred_server"))
{

View File

@ -27,7 +27,7 @@
#include <memory>
#include <maxscale/buffer.hh>
#include <maxscale/pcre2.h>
#include <maxscale/pcre2.hh>
#include <maxscale/service.hh>
#include <maxscale/backend.hh>
#include <maxscale/protocol/rwbackend.hh>