From b2d86bb8a1bc965ad72d00ba5ef98d0e4bbfb155 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 10 Jan 2023 23:02:45 +0000 Subject: Qualify auto correctly in all cases. --- include/event.h | 4 ++-- include/modules/regex.h | 2 +- include/stdalgo.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/event.h b/include/event.h index 4795d3c39..08442b896 100644 --- a/include/event.h +++ b/include/event.h @@ -200,7 +200,7 @@ inline void Events::ModuleEventProvider::Call(void (Class::*function)(FunArgs... if (GetModule() && GetModule()->dying) return; - for (const auto& subscriber : GetSubscribers()) + for (auto* subscriber : GetSubscribers()) { const Module* mod = subscriber->GetModule(); if (!mod || mod->dying) @@ -218,7 +218,7 @@ inline ModResult Events::ModuleEventProvider::FirstResult(ModResult (Class::*fun return MOD_RES_PASSTHRU; ModResult result; - for (const auto& subscriber : GetSubscribers()) + for (auto* subscriber : GetSubscribers()) { const Module* mod = subscriber->GetModule(); if (!mod || mod->dying) diff --git a/include/modules/regex.h b/include/modules/regex.h index 62cfcfdf0..f4b557b50 100644 --- a/include/modules/regex.h +++ b/include/modules/regex.h @@ -252,7 +252,7 @@ inline Regex::PatternPtr Regex::Engine::CreateHuman(const std::string& pattern) throw Exception(creator, pattern, "Regex patterns must be terminated with a '/'!"); uint8_t options = Regex::OPT_NONE; - for (const auto& flag : insp::iterator_range(pattern.begin() + end + 1, pattern.end())) + for (const auto flag : insp::iterator_range(pattern.begin() + end + 1, pattern.end())) { switch (flag) { diff --git a/include/stdalgo.h b/include/stdalgo.h index 609ef2b2d..b19b736ba 100644 --- a/include/stdalgo.h +++ b/include/stdalgo.h @@ -212,7 +212,7 @@ namespace stdalgo template inline void escape(const std::string& str, std::string& out) { - for (const auto& c : str) + for (const auto c : str) { if (c == esc) out.append(2, esc); -- cgit v1.3.1-10-gc9f91