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_opermotd.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/modules/m_opermotd.cpp') diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp index e4dad979b..91f25cbee 100644 --- a/src/modules/m_opermotd.cpp +++ b/src/modules/m_opermotd.cpp @@ -74,12 +74,8 @@ class CommandOpermotd : public Command } user->WriteRemoteNumeric(RPL_OMOTDSTART, "Server operators message of the day"); - - for (file_cache::const_iterator i = opermotd.begin(); i != opermotd.end(); ++i) - { - user->WriteRemoteNumeric(RPL_OMOTD, InspIRCd::Format(" %s", i->c_str())); - } - + for (const auto& line : opermotd) + user->WriteRemoteNumeric(RPL_OMOTD, InspIRCd::Format(" %s", line.c_str())); user->WriteRemoteNumeric(RPL_ENDOFOMOTD, "End of OPERMOTD"); } }; -- cgit v1.3.1-10-gc9f91