From 1b11dfeca5c4e11585129221d966e84c5c775402 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Sat, 9 Mar 2024 20:46:54 +0100 Subject: [PATCH] Simplify a loop with a for-each. These loops were brought by C++11. The next step could be using std::any_of. --- src/mathed/MathSupport.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 57e8c6ee4e..585320f11a 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -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; -- 2.39.2