diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2022-08-19 17:34:12 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2022-08-19 17:34:55 +0200 |
commit | 2effe9775db423d61d8a2bdd15c40e6015bac6f5 (patch) | |
tree | c39246dbbd85c66987dd8c2c071648f2da7eaede /src/utils/stringfilter.cpp | |
parent | 109b602701578b9f2b29282f84bf2757544f8d32 (diff) | |
download | manaserv-2effe9775db423d61d8a2bdd15c40e6015bac6f5.tar.gz manaserv-2effe9775db423d61d8a2bdd15c40e6015bac6f5.tar.bz2 manaserv-2effe9775db423d61d8a2bdd15c40e6015bac6f5.tar.xz manaserv-2effe9775db423d61d8a2bdd15c40e6015bac6f5.zip |
Apply C++11 fixits
modernize-loop-convert
modernize-deprecated-headers
Diffstat (limited to 'src/utils/stringfilter.cpp')
-rw-r--r-- | src/utils/stringfilter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/utils/stringfilter.cpp b/src/utils/stringfilter.cpp index 8c417ed0..381a0c43 100644 --- a/src/utils/stringfilter.cpp +++ b/src/utils/stringfilter.cpp @@ -80,14 +80,13 @@ bool StringFilter::filterContent(const std::string &text) const std::string upperCaseText = text; std::transform(text.begin(), text.end(), upperCaseText.begin(), - (int(*)(int))std::toupper); + (int(*)(int))std::toupper); - for (auto i = mSlangs.begin(); i != mSlangs.end(); ++i) + for (auto upperCaseSlang : mSlangs) { // We look for slangs into the sentence. - std::string upperCaseSlang = *i; std::transform(upperCaseSlang.begin(), upperCaseSlang.end(), - upperCaseSlang.begin(), (int(*)(int))std::toupper); + upperCaseSlang.begin(), (int(*)(int))std::toupper); if (upperCaseText.compare(upperCaseSlang)) { isContentClean = false; |