From 942fd2bcfd384a12c900999fe663202c87319a68 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 6 Apr 2021 20:06:18 +0100 Subject: Switch simple iterator loops to use range-based for loops. --- src/modules/m_xline_db.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/modules/m_xline_db.cpp') 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 types = ServerInstance->XLines->GetAllTypes(); - for (std::vector::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; -- cgit v1.3.1-10-gc9f91