qFindChar: pass char16_t by value
Cheaply-copied types should be passed by value according to https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-in Change-Id: I341193c0a65931c1406fc7d711ef74d763178dee Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
3d631da88b
commit
8419b56097
@ -150,7 +150,7 @@ static inline qsizetype qFindChar(QStringView str, QChar ch, qsizetype from, Qt:
|
|||||||
return n - s;
|
return n - s;
|
||||||
} else {
|
} else {
|
||||||
c = foldCase(c);
|
c = foldCase(c);
|
||||||
auto it = std::find_if(n, e, [c](const auto &ch) { return foldAndCompare(ch, c); });
|
auto it = std::find_if(n, e, [c](auto ch) { return foldAndCompare(ch, c); });
|
||||||
if (it != e)
|
if (it != e)
|
||||||
return std::distance(s, it);
|
return std::distance(s, it);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user