From d969715fa4df9de762c652a7af27601fa75fb275 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 19 Jul 2023 22:29:35 +0200 Subject: Simplify a bit by removing a redundant condition line 627 already contains: if( nMaxDigit > nDigitPos ) so here we know that nMaxDigit >= nDigitPos Change-Id: Ia7ed69e19a6567a5947edaa57f687bf97476a616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154661 Tested-by: Jenkins Reviewed-by: Julien Nabet --- basic/source/sbx/sbxform.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'basic/source') diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx index e97524a019e3..02bc6a01a8fd 100644 --- a/basic/source/sbx/sbxform.cxx +++ b/basic/source/sbx/sbxform.cxx @@ -635,7 +635,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber, bFirstDigit = false; } // coverity[copy_paste_error : FALSE] - this is correct and nDigitPos should not be j - if( bGenerateThousandSeparator && ( c=='0' || nMaxDigit >= nDigitPos ) && j > 0 && (j % 3 == 0) ) + if( bGenerateThousandSeparator && c=='0' && j > 0 && (j % 3 == 0) ) { sReturnStrg.append(cThousandSep ); } -- cgit