summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-16 14:04:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-16 14:03:25 +0100
commit12e460d99988a66179381fe40185978450ea0ea0 (patch)
treeb9c38e7c4a3c1a71647a75c8be9356813c6200a4 /basic
parentcaf9cd9389b30cd6eb93735d89aae90c1d835f5c (diff)
loplugin:buriedassign in avmedia..cui
Change-Id: Id44f1e98a3aac2c417f8030de603175bf68f0dfe Reviewed-on: https://gerrit.libreoffice.org/63467 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxform.cxx8
-rw-r--r--basic/source/sbx/sbxscan.cxx8
2 files changed, 11 insertions, 5 deletions
diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx
index aa1bbb0a276f..45a88b556546 100644
--- a/basic/source/sbx/sbxform.cxx
+++ b/basic/source/sbx/sbxform.cxx
@@ -625,8 +625,8 @@ void SbxBasicFormater::ScanFormatString( double dNumber,
{
for( short j = nMaxDigit; j > nDigitPos; j-- )
{
- short nTempDigit;
- AppendDigit( sReturnStrg, nTempDigit = GetDigitAtPosScan( j, bFoundFirstDigit ) );
+ short nTempDigit = GetDigitAtPosScan( j, bFoundFirstDigit );
+ AppendDigit( sReturnStrg, nTempDigit );
if( nTempDigit != NO_DIGIT_ )
{
bFirstDigit = false;
@@ -654,8 +654,8 @@ void SbxBasicFormater::ScanFormatString( double dNumber,
}
else
{
- short nTempDigit;
- AppendDigit( sReturnStrg, nTempDigit = GetDigitAtPosScan( nDigitPos, bFoundFirstDigit ) );
+ short nTempDigit = GetDigitAtPosScan( nDigitPos, bFoundFirstDigit ) ;
+ AppendDigit( sReturnStrg, nTempDigit );
if( nTempDigit != NO_DIGIT_ )
{
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 9b1e47827b03..d0d7cd52326e 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -408,7 +408,13 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth,
if( nExpWidth < 3 ) nExpWidth = 3;
nExpWidth -= 2;
*pBuf++ = 'E';
- *pBuf++ =( nExp < 0 ) ?( (nExp = -nExp ), '-' ) : '+';
+ if ( nExp < 0 )
+ {
+ nExp = -nExp;
+ *pBuf++ = '-';
+ }
+ else
+ *pBuf++ = '+';
while( nExpWidth > 3 )
{
*pBuf++ = '0';