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()) { if (at->asFontInset()) {
MathData const & ar = at->asFontInset()->cell(0); MathData const & ar = at->asFontInset()->cell(0);
for (size_t i = 0; i < ar.size(); ++i) { for (const auto & i : ar) {
if (!(ar[i]->asCharInset() || if (!(i->asCharInset() ||
(ar[i]->asSymbolInset() && (i->asSymbolInset() &&
ar[i]->asSymbolInset()->isOrdAlpha()))) i->asSymbolInset()->isOrdAlpha())))
return false; return false;
} }
return true; return true;