diff options
| author | 2020-10-31 20:03:19 +0000 | |
|---|---|---|
| committer | 2020-10-31 22:33:35 +0000 | |
| commit | 441bd151da733d32e194de6e4a1744ae273b83ee (patch) | |
| tree | 74eb1ee2aef413185bf3906a17f1b2c27373e03a /src/modules/m_vhost.cpp | |
| parent | Fix reading the <sslprofile> config. (diff) | |
| download | inspircd++-441bd151da733d32e194de6e4a1744ae273b83ee.tar.gz inspircd++-441bd151da733d32e194de6e4a1744ae273b83ee.tar.bz2 inspircd++-441bd151da733d32e194de6e4a1744ae273b83ee.zip | |
Add stdalgo::iterator_range and switch config tag reading to use it.
This allows us to use range-based for loops which were not possible
with the previous config tag system.
Diffstat (limited to 'src/modules/m_vhost.cpp')
| -rw-r--r-- | src/modules/m_vhost.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 3f580029b..2a519f23d 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -98,10 +98,8 @@ class ModuleVHost : public Module void ReadConfig(ConfigStatus& status) override { CustomVhostMap newhosts; - ConfigTagList tags = ServerInstance->Config->ConfTags("vhost"); - for (ConfigIter i = tags.first; i != tags.second; ++i) + for (auto& [_, tag] : ServerInstance->Config->ConfTags("vhost")) { - ConfigTag* tag = i->second; std::string mask = tag->getString("host"); if (mask.empty()) throw ModuleException("<vhost:host> is empty! at " + tag->getTagLocation()); |
