basic/source/runtime/methods.cxx |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

New commits:
commit be062b15b02fc4e722e1c44e95d58fc216f51ef0
Author:     Teemu Pöytäniemi <teemu.poytani...@windowslive.com>
AuthorDate: Sun Aug 31 14:01:01 2025 +0300
Commit:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
CommitDate: Sun Aug 31 17:15:36 2025 +0200

    tdf#147132 Flatten Basic function
    
    Change-Id: I3c9784135389ec1d96650dbd27192528a32b7654
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190433
    Tested-by: Jenkins
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index fe427a0dbc9b..f6fefdfb760c 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3292,15 +3292,11 @@ void SbRtl_Randomize(StarBASIC *, SbxArray & rPar, bool)
 void SbRtl_Rnd(StarBASIC *, SbxArray & rPar, bool)
 {
     if (rPar.Count() > 2)
-    {
-        StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
-    }
-    else
-    {
-        std::uniform_real_distribution<double> dist(0.0, 1.0);
-        double const tmp(dist(theRandomNumberGenerator().global_rng));
-        rPar.Get(0)->PutDouble(tmp);
-    }
+        return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
+
+    std::uniform_real_distribution<double> dist(0.0, 1.0);
+    double const tmp(dist(theRandomNumberGenerator().global_rng));
+    rPar.Get(0)->PutDouble(tmp);
 }
 
 

Reply via email to