From 696add259bf603cf7c2ca807f4cab793764708af Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 17 Jul 2018 22:15:10 +0200 Subject: [PATCH] config/Global: remove unused function config_find_block() --- src/config/Data.hxx | 6 ++++++ src/config/Global.cxx | 6 ------ src/config/Global.hxx | 10 ---------- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/config/Data.hxx b/src/config/Data.hxx index a57a16f72..cee34f24e 100644 --- a/src/config/Data.hxx +++ b/src/config/Data.hxx @@ -44,7 +44,13 @@ struct ConfigData { } /** + * Find a block with a matching attribute. + * * Throws if a block doesn't have the specified (mandatory) key. + * + * @param option the blocks to search + * @param key the attribute name + * @param value the expected attribute value */ gcc_pure const ConfigBlock *FindBlock(ConfigBlockOption option, diff --git a/src/config/Global.cxx b/src/config/Global.cxx index 8892c688b..255ec05d7 100644 --- a/src/config/Global.cxx +++ b/src/config/Global.cxx @@ -92,12 +92,6 @@ config_get_block(ConfigBlockOption option) noexcept return config_data.GetBlock(option); } -const ConfigBlock * -config_find_block(ConfigBlockOption option, const char *key, const char *value) -{ - return config_data.FindBlock(option, key, value); -} - const char * config_get_string(ConfigOption option, const char *default_value) noexcept { diff --git a/src/config/Global.hxx b/src/config/Global.hxx index 7be0517cb..c2abd0aa8 100644 --- a/src/config/Global.hxx +++ b/src/config/Global.hxx @@ -59,16 +59,6 @@ gcc_pure const ConfigBlock * config_get_block(enum ConfigBlockOption option) noexcept; -/** - * Find a block with a matching attribute. - * - * @param option the blocks to search - * @param key the attribute name - * @param value the expected attribute value - */ -const ConfigBlock * -config_find_block(ConfigBlockOption option, const char *key, const char *value); - const char * config_get_string(enum ConfigOption option, const char *default_value=nullptr) noexcept;