diff options
| author | 2021-04-01 18:10:11 +0100 | |
|---|---|---|
| committer | 2021-04-01 18:10:11 +0100 | |
| commit | ef24ec632da12f272eddcf9924eacde9260597a2 (patch) | |
| tree | 1d9561525e174249c2776fae38ce6c757a17a901 /src/modules/m_httpd_config.cpp | |
| parent | Implement support for random spamtrap channels in the LIST output. (diff) | |
Constify variables within loops.
Diffstat (limited to 'src/modules/m_httpd_config.cpp')
| -rw-r--r-- | src/modules/m_httpd_config.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_httpd_config.cpp b/src/modules/m_httpd_config.cpp index a42fec8ea..61abbadfa 100644 --- a/src/modules/m_httpd_config.cpp +++ b/src/modules/m_httpd_config.cpp @@ -46,7 +46,7 @@ class ModuleHttpConfig : public Module, public HTTPRequestEventListener ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Handling HTTP request for %s", request.GetPath().c_str()); std::stringstream buffer; - for (auto& [_, tag] : ServerInstance->Config->config_data) + for (const auto& [_, tag] : ServerInstance->Config->config_data) { // Show the location of the tag in a comment. buffer << "# " << tag->source.str() << std::endl @@ -55,7 +55,7 @@ class ModuleHttpConfig : public Module, public HTTPRequestEventListener // Print out the tag with all keys aligned vertically. const std::string indent(tag->name.length() + 2, ' '); bool first = true; - for (auto& [key, value] : tag->GetItems()) + for (const auto& [key, value] : tag->GetItems()) { if (!first) buffer << std::endl << indent; |
