diff options
| author | 2021-04-06 20:06:18 +0100 | |
|---|---|---|
| committer | 2021-04-07 10:36:11 +0100 | |
| commit | 942fd2bcfd384a12c900999fe663202c87319a68 (patch) | |
| tree | c2bad1906af27afbc3c7d96c3e5ca3c27c83f090 /src/modules/m_xline_db.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Switch simple iterator loops to use range-based for loops.
Diffstat (limited to 'src/modules/m_xline_db.cpp')
| -rw-r--r-- | src/modules/m_xline_db.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index ec8cc4982..a49208422 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -125,16 +125,14 @@ class ModuleXLineDB stream << "VERSION 1" << std::endl; // Now, let's write. - std::vector<std::string> types = ServerInstance->XLines->GetAllTypes(); - for (std::vector<std::string>::const_iterator it = types.begin(); it != types.end(); ++it) + for (const auto& xltype : ServerInstance->XLines->GetAllTypes()) { - XLineLookup* lookup = ServerInstance->XLines->GetAll(*it); + XLineLookup* lookup = ServerInstance->XLines->GetAll(xltype); if (!lookup) continue; // Not possible as we just obtained the list from XLineManager - for (LookupIter i = lookup->begin(); i != lookup->end(); ++i) + for (const auto& [_, line] : *lookup) { - XLine* line = i->second; if (line->from_config) continue; |
