summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/configuration.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r--apt-pkg/contrib/configuration.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 8005ef7d4..78a98d614 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -92,10 +92,9 @@ static ConfigType getConfigType(std::string const &type) /*{{{*/
return ConfigType::UNDEFINED;
}
/*}}}*/
-static void checkFindConfigOptionType(std::string name, ConfigType const type)/*{{{*/
+// checkFindConfigOptionType - workhorse of option checking /*{{{*/
+static void checkFindConfigOptionTypeInternal(std::string name, ConfigType const type)
{
- if (apt_known_config.empty())
- return;
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
auto known = apt_known_config.find(name);
if (known == apt_known_config.cend())
@@ -152,6 +151,12 @@ static void checkFindConfigOptionType(std::string name, ConfigType const type)/*
name.c_str(), getConfigTypeString(known->second).c_str(), getConfigTypeString(type).c_str());
}
}
+static void checkFindConfigOptionType(char const * const name, ConfigType const type)
+{
+ if (apt_known_config.empty())
+ return;
+ checkFindConfigOptionTypeInternal(name, type);
+}
/*}}}*/
static bool LoadConfigurationIndex(std::string const &filename) /*{{{*/
{