diff options
| author | 2023-01-10 23:02:45 +0000 | |
|---|---|---|
| committer | 2023-01-10 23:30:34 +0000 | |
| commit | b2d86bb8a1bc965ad72d00ba5ef98d0e4bbfb155 (patch) | |
| tree | 3319a65d5472ec30780560003264fa815dbfd711 /include | |
| parent | Fix some unnecessary string copies. (diff) | |
Qualify auto correctly in all cases.
Diffstat (limited to 'include')
| -rw-r--r-- | include/event.h | 4 | ||||
| -rw-r--r-- | include/modules/regex.h | 2 | ||||
| -rw-r--r-- | include/stdalgo.h | 2 |
3 files changed, 4 insertions, 4 deletions
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 <char from, char to, char esc> 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); |
