Simplify a loop with a for-each.

These loops were brought by C++11. The next step could be using std::any_of.
This commit is contained in:
Thibaut Cuvelier 2024-03-09 20:46:54 +01:00
parent 04beccca4c
commit 1b11dfeca5

View File

@ -1070,10 +1070,10 @@ bool isAlphaSymbol(MathAtom const & at)
if (at->asFontInset()) {
MathData const & ar = at->asFontInset()->cell(0);
for (size_t i = 0; i < ar.size(); ++i) {
if (!(ar[i]->asCharInset() ||
(ar[i]->asSymbolInset() &&
ar[i]->asSymbolInset()->isOrdAlpha())))
for (const auto & i : ar) {
if (!(i->asCharInset() ||
(i->asSymbolInset() &&
i->asSymbolInset()->isOrdAlpha())))
return false;
}
return true;