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/socket.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/socket.cpp') diff --git a/src/socket.cpp b/src/socket.cpp index ca432db6f..f5f1cc820 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -65,11 +65,8 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports) size_t bound = 0; std::vector old_ports(ports.begin(), ports.end()); - ConfigTagList tags = ServerInstance->Config->ConfTags("bind"); - for (ConfigIter i = tags.first; i != tags.second; ++i) + for (auto& [_, tag] : ServerInstance->Config->ConfTags("bind")) { - ConfigTag* tag = i->second; - // Are we creating a TCP/IP listener? const std::string address = tag->getString("address"); const std::string portlist = tag->getString("port"); -- cgit v1.3.1-10-gc9f91