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_spanningtree/uid.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/m_spanningtree/uid.cpp') diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index f4bf2d913..2831c8de6 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -86,16 +86,16 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, CommandBase::Params unsigned int paramptr = 9; - for (std::string::const_iterator v = modestr.begin(); v != modestr.end(); ++v) + for (const auto& modechr : modestr) { // Accept more '+' chars, for now - if (*v == '+') + if (modechr == '+') continue; /* For each mode that's set, find the mode handler and set it on the new user */ - ModeHandler* mh = ServerInstance->Modes.FindMode(*v, MODETYPE_USER); + ModeHandler* mh = ServerInstance->Modes.FindMode(modechr, MODETYPE_USER); if (!mh) - throw ProtocolException("Unrecognised mode '" + std::string(1, *v) + "'"); + throw ProtocolException("Unrecognised mode '" + std::string(1, modechr) + "'"); if (mh->NeedsParam(true)) { -- cgit v1.3.1-10-gc9f91