basic/source/comp/exprgen.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e4317008765b06aba3ec3462564ac50852c2b07f
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat Aug 17 22:09:43 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Aug 17 22:37:15 2024 +0200

    Move the check out of the loop
    
    Change-Id: I151ac6399d2cc5870971f258614480fcbdff5c82
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171979
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx
index b02db9fe6a24..3f35f6c0dc6e 100644
--- a/basic/source/comp/exprgen.cxx
+++ b/basic/source/comp/exprgen.cxx
@@ -136,12 +136,12 @@ void SbiExprNode::Gen( SbiCodeGen& rGen, RecursiveMode 
eRecMode )
                 eOp = SbiOpcode::FIND_STATIC_;
             }
         }
+
+        if (pWithParent_ != nullptr)
+            pWithParent_->Gen(rGen);
+
         for( SbiExprNode* p = this; p; p = p->aVar.pNext )
         {
-            if( p == this && pWithParent_ != nullptr )
-            {
-                pWithParent_->Gen(rGen);
-            }
             p->GenElement( rGen, eOp );
             eOp = SbiOpcode::ELEM_;
         }

Reply via email to