summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-03-03 20:44:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-03-03 20:48:57 +0000
commit5f6065f980756fdb81c7018bedbb7f54e2b8214a (patch)
treef648ca59dca4237747f83fd95e1e46574b3a6e88 /vcl
parentcd5cc12d4330d68d0a233a82eda30e983ce202a4 (diff)
coverity#1355126 Logically dead code
maybe we should be using more precision, but we haven't been in the past Change-Id: Icf1e1e95099c783435e04f60d8ade755a8d2d4d5
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 746636a5beb8..0a4d5953a42f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -845,17 +845,14 @@ static void appendFixedInt( sal_Int32 nValue, OStringBuffer& rBuffer )
rBuffer.append( '-' );
nValue = -nValue;
}
- sal_Int32 nFactor = 10;
- sal_Int32 nInt = nValue / nFactor;
+ const sal_Int32 nFactor = 10;
+ const sal_Int32 nInt = nValue / nFactor;
rBuffer.append( nInt );
sal_Int32 nDecimal = nValue % nFactor;
- if( nDecimal )
+ if (nDecimal)
{
- rBuffer.append( '.' );
- // omit trailing zeros
- while( (nDecimal % 10) == 0 )
- nDecimal /= 10;
- rBuffer.append( nDecimal );
+ rBuffer.append('.');
+ rBuffer.append(nDecimal);
}
}