diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-02 08:56:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-02 08:59:01 +0000 |
commit | 6a80d33bab27a14d35b72adc9d9869ba3f388dd9 (patch) | |
tree | adaa501b821c862e6323a5d7ee2c55d2f528ca7e /vcl | |
parent | 211925e144849ad14469a1a6c6451f61fcf369cf (diff) |
coverity#1396674 'Constant' variable guards dead code
Change-Id: I9163b1663d2e2976fe6ca7983e94ed07af663f82
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index f65843581d52..dabd564849f3 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -596,16 +596,14 @@ void GenPspGraphics::DrawTextLayout(const CommonSalLayout& rLayout) DeviceCoordinate aWidthAry[ nMaxGlyphs ]; sal_Int32 aIdxAry [ nMaxGlyphs ]; sal_Unicode aUnicodes[ nMaxGlyphs ]; - int aCharPosAry [ nMaxGlyphs ]; Point aPos; long nUnitsPerPixel = rLayout.GetUnitsPerPixel(); - const sal_Unicode* pText = nullptr; int nMinCharPos = 0; int nMaxCharPos = 0; for( int nStart = 0;; ) { - int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry, pText ? aCharPosAry : nullptr ); + int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry, nullptr ); if( !nGlyphCount ) break; @@ -615,10 +613,7 @@ void GenPspGraphics::DrawTextLayout(const CommonSalLayout& rLayout) nXOffset += aWidthAry[ i ]; aIdxAry[ i ] = nXOffset / nUnitsPerPixel; sal_GlyphId aGlyphId = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK); - if( pText ) - aUnicodes[i] = (aCharPosAry[i] >= nMinCharPos && aCharPosAry[i] <= nMaxCharPos) ? pText[ aCharPosAry[i] ] : 0; - else - aUnicodes[i] = 0; + aUnicodes[i] = 0; aGlyphAry[i] = aGlyphId; } |