summaryrefslogtreecommitdiff
path: root/vcl/source/fontsubset
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-15 15:53:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-16 16:42:49 +0100
commitaa583636e35aa1d6ae03906eb0a2953247a71f66 (patch)
tree73312aaf5667870be6ebb76095a468e696d2358d /vcl/source/fontsubset
parent633003965a4be0c535b43cc3072c5c4a95109d34 (diff)
coverity#1202771 Operands don't affect result
Change-Id: I6a0228594d31cda252f299cad55469ad02c6b353
Diffstat (limited to 'vcl/source/fontsubset')
-rw-r--r--vcl/source/fontsubset/cff.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 2ad874bb000f..2d3ce6102307 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -678,16 +678,7 @@ void CffSubsetterContext::writeType1Val( ValType aVal)
U8* pOut = mpWritePtr;
int nInt = static_cast<int>(aVal);
- static const int nOutCharstrType = 1;
- if( (nInt != aVal) && (nOutCharstrType == 2)) {
- // numtype==255 means int32 for Type1, but 16.16 for Type2 charstrings!!!
- *(pOut++) = 255; // Fixed 16.16
- *(pOut++) = static_cast<U8>(nInt >> 8);
- *(pOut++) = static_cast<U8>(nInt);
- nInt = static_cast<int>(aVal * 0x10000) & 0xFFFF;
- *(pOut++) = static_cast<U8>(nInt >> 8);
- *(pOut++) = static_cast<U8>(nInt);
- } else if( (nInt >= -107) && (nInt <= +107)) {
+ if( (nInt >= -107) && (nInt <= +107)) {
*(pOut++) = static_cast<U8>(nInt + 139); // -107..+107
} else if( (nInt >= -1131) && (nInt <= +1131)) {
if( nInt >= 0)
@@ -696,7 +687,7 @@ void CffSubsetterContext::writeType1Val( ValType aVal)
nInt = 64148 - nInt; // -108..-1131
*(pOut++) = static_cast<U8>(nInt >> 8);
*(pOut++) = static_cast<U8>(nInt);
- } else if( nOutCharstrType == 1) {
+ } else {
// numtype==255 means int32 for Type1, but 16.16 for Type2 charstrings!!!
*(pOut++) = 255;
*(pOut++) = static_cast<U8>(nInt >> 24);