aboutsummaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-11-03 22:30:58 +0000
committerGravatar Sadie Powell2020-11-03 22:30:58 +0000
commit3075cc7bd0aa6db5752e76183c267d091584705f (patch)
tree0dc08804108dd3391e158ed79a2bbedfed0911dc /src/configreader.cpp
parentStore the SQL row id in the synthesised sqloper config tags. (diff)
Move config typedefs to ServerConfig and use auto in more places.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index c70777ec1..5fd50252d 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -447,7 +447,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
try
{
// Ensure the user has actually edited ther config.
- ConfigTagList dietags = ConfTags("die");
+ auto dietags = ConfTags("die");
if (!dietags.empty())
{
errstr << "Your configuration has not been edited correctly!" << std::endl;
@@ -476,7 +476,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
if (valid)
ServerInstance->WritePID(!old);
- ConfigTagList binds = ConfTags("bind");
+ auto binds = ConfTags("bind");
if (binds.empty())
errstr << "Possible configuration error: you have not defined any <bind> blocks." << std::endl
<< "You will need to do this if you want clients to be able to connect!" << std::endl;
@@ -614,9 +614,9 @@ void ServerConfig::ApplyModules(User* user)
}
}
-std::shared_ptr<ConfigTag> ServerConfig::ConfValue(const std::string &tag)
+std::shared_ptr<ConfigTag> ServerConfig::ConfValue(const std::string& tag)
{
- std::pair<ConfigIter, ConfigIter> found = config_data.equal_range(tag);
+ auto found = config_data.equal_range(tag);
if (found.first == found.second)
return EmptyTag;
@@ -628,9 +628,9 @@ std::shared_ptr<ConfigTag> ServerConfig::ConfValue(const std::string &tag)
return rv;
}
-ConfigTagList ServerConfig::ConfTags(const std::string& tag)
+ServerConfig::TagList ServerConfig::ConfTags(const std::string& tag)
{
- return stdalgo::iterator_range<ConfigIter>(config_data.equal_range(tag));
+ return ServerConfig::TagList(config_data.equal_range(tag));
}
std::string ServerConfig::Escape(const std::string& str)