From ef24ec632da12f272eddcf9924eacde9260597a2 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 1 Apr 2021 18:10:11 +0100 Subject: Constify variables within loops. --- src/modules/m_codepage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_codepage.cpp') diff --git a/src/modules/m_codepage.cpp b/src/modules/m_codepage.cpp index 3ce821418..69bd6c1ad 100644 --- a/src/modules/m_codepage.cpp +++ b/src/modules/m_codepage.cpp @@ -144,7 +144,7 @@ class ModuleCodepage AllowedChars newallowedchars; AllowedChars newallowedfrontchars; - for (auto& [_, tag] : ServerInstance->Config->ConfTags("cpchars")) + for (const auto& [_, tag] : ServerInstance->Config->ConfTags("cpchars")) { unsigned char begin = tag->getUInt("begin", tag->getUInt("index", 0), 1, UCHAR_MAX); if (!begin) @@ -180,7 +180,7 @@ class ModuleCodepage for (size_t i = 0; i < UCHAR_MAX; ++i) newcasemap[i] = i; - for (auto& [_, tag] : ServerInstance->Config->ConfTags("cpcase")) + for (const auto& [_, tag] : ServerInstance->Config->ConfTags("cpcase")) { unsigned char lower = tag->getUInt("lower", 0, 1, UCHAR_MAX); if (!lower) -- cgit v1.3.1-10-gc9f91