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_customprefix.cpp | |
| parent | Fix reading the <sslprofile> config. (diff) | |
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_customprefix.cpp')
| -rw-r--r-- | src/modules/m_customprefix.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp index 6a98c1f7b..70cf68f77 100644 --- a/src/modules/m_customprefix.cpp +++ b/src/modules/m_customprefix.cpp @@ -55,11 +55,8 @@ class ModuleCustomPrefix : public Module void init() override { - ConfigTagList tags = ServerInstance->Config->ConfTags("customprefix"); - for (ConfigIter iter = tags.first; iter != tags.second; ++iter) + for (auto& [_, tag] : ServerInstance->Config->ConfTags("customprefix")) { - ConfigTag* tag = iter->second; - const std::string name = tag->getString("name"); if (name.empty()) throw ModuleException("<customprefix:name> must be specified at " + tag->getTagLocation()); |
