From 6e47e797909564460fbf30372000c8a879e0f891 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Jan 2013 22:25:17 +0100 Subject: ConfigData: move functions into the class --- src/ConfigData.hxx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/ConfigData.hxx') diff --git a/src/ConfigData.hxx b/src/ConfigData.hxx index 36e3ea332..93d1092fb 100644 --- a/src/ConfigData.hxx +++ b/src/ConfigData.hxx @@ -68,8 +68,20 @@ struct config_param { config_param(int _line=-1) :value(nullptr), line(_line), used(false) {} + + gcc_nonnull_all config_param(const char *_value, int _line=-1); + ~config_param(); + + gcc_nonnull_all + void AddBlockParam(const char *_name, const char *_value, + int _line=-1) { + block_params.emplace_back(_name, _value, _line); + } + + gcc_nonnull_all gcc_pure + const block_param *GetBlockParam(const char *_name) const; #endif }; @@ -85,14 +97,6 @@ struct ConfigData { extern "C" { #endif -void -config_add_block_param(struct config_param * param, const char *name, - const char *value, int line); - -gcc_pure -const struct block_param * -config_get_block_param(const struct config_param *param, const char *name); - gcc_pure const char * config_get_block_string(const struct config_param *param, const char *name, -- cgit v1.2.3