commit 1b11dfeca5c4e11585129221d966e84c5c775402
Author: Thibaut Cuvelier <tcuvel...@lyx.org>
Date:   Sat Mar 9 20:46:54 2024 +0100

    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;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to