summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-29 16:58:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-29 18:12:08 +0000
commite9c7da896f1b9dd66ee57883607afe566f2c5d67 (patch)
tree4e949ff7a908fe6d4dd3c153e365247f82c482d4 /vcl
parente67a148d52fc565b00bd6d101cf9d6e0c67a95b4 (diff)
coverity#704394 Logically dead code
Change-Id: I380730d3f915fb5cd9e2e2be272d4c9c56dd0831
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/print/common_gfx.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx
index 20484ab4b1e9..3b1f87e88ebb 100644
--- a/vcl/generic/print/common_gfx.cxx
+++ b/vcl/generic/print/common_gfx.cxx
@@ -219,7 +219,7 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it,
rightside.push_back( Point( aLastRect.Right()+1, aLastRect.Bottom()+1 ) );
// cool, we can concatenate rectangles
- int nDX = -65536, nDY = 65536;
+ const int nDX = -65536, nDY = 65536;
int nNewDX = 0, nNewDY = 0;
Point aLastPoint = leftside.front();
@@ -234,9 +234,7 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it,
{
nNewDX = aPoint.X() - aLastPoint.X();
nNewDY = aPoint.Y() - aLastPoint.Y();
- if( nNewDX == 0 && nDX == 0 )
- continue;
- if( nDX != 0 && nNewDX != 0 &&
+ if( nNewDX != 0 &&
(double)nNewDY/(double)nNewDX == (double)nDY/(double)nDX )
continue;
}
@@ -245,8 +243,6 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it,
}
aLastPoint = rightside.back();
- nDX = -65536;
- nDY = 65536;
PSBinLineTo (aLastPoint, rOldPoint, rColumn);
rightside.pop_back();
while( rightside.begin() != rightside.end() )
@@ -257,9 +253,7 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it,
{
nNewDX = aPoint.X() - aLastPoint.X();
nNewDY = aPoint.Y() - aLastPoint.Y();
- if( nNewDX == 0 && nDX == 0 )
- continue;
- if( nDX != 0 && nNewDX != 0 &&
+ if( nNewDX != 0 &&
(double)nNewDY/(double)nNewDX == (double)nDY/(double)nDX )
continue;
}