From 441bd151da733d32e194de6e4a1744ae273b83ee Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 31 Oct 2020 20:03:19 +0000 Subject: 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. --- src/logger.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/logger.cpp') diff --git a/src/logger.cpp b/src/logger.cpp index 2543f684f..6f258cd72 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -73,10 +73,9 @@ void LogManager::OpenFileLogs() if (!ServerInstance->Config->cmdline.writelog) return; std::map logmap; - ConfigTagList tags = ServerInstance->Config->ConfTags("log"); - for(ConfigIter i = tags.first; i != tags.second; ++i) + + for (auto& [_, tag] : ServerInstance->Config->ConfTags("log")) { - ConfigTag* tag = i->second; std::string method = tag->getString("method"); if (!stdalgo::string::equalsci(method, "file")) { -- cgit v1.3.1-10-gc9f91