diff options
Diffstat (limited to 'xfa/fxbarcode')
-rw-r--r-- | xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp | 12 | ||||
-rw-r--r-- | xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp index f091de08b5..1c20b7c8a1 100644 --- a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp +++ b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp @@ -183,20 +183,20 @@ CFX_WideString CBC_ErrorCorrection::createECCBlock(CFX_WideString codewords, e = BCExceptionIllegalArgument; return (FX_WCHAR*)""; } - FX_WORD* ecc = FX_Alloc(FX_WORD, numECWords); - FXSYS_memset(ecc, 0, numECWords * sizeof(FX_WORD)); + uint16_t* ecc = FX_Alloc(uint16_t, numECWords); + FXSYS_memset(ecc, 0, numECWords * sizeof(uint16_t)); for (int32_t l = start; l < start + len; l++) { - FX_WORD m = ecc[numECWords - 1] ^ codewords.GetAt(l); + uint16_t m = ecc[numECWords - 1] ^ codewords.GetAt(l); for (int32_t k = numECWords - 1; k > 0; k--) { if (m != 0 && FACTORS[table][k] != 0) { - ecc[k] = (FX_WORD)(ecc[k - 1] ^ - ALOG[(LOG[m] + LOG[FACTORS[table][k]]) % 255]); + ecc[k] = (uint16_t)(ecc[k - 1] ^ + ALOG[(LOG[m] + LOG[FACTORS[table][k]]) % 255]); } else { ecc[k] = ecc[k - 1]; } } if (m != 0 && FACTORS[table][0] != 0) { - ecc[0] = (FX_WORD)ALOG[(LOG[m] + LOG[FACTORS[table][0]]) % 255]; + ecc[0] = (uint16_t)ALOG[(LOG[m] + LOG[FACTORS[table][0]]) % 255]; } else { ecc[0] = 0; } diff --git a/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp b/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp index d52648c683..04246bd5d8 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp @@ -361,7 +361,7 @@ int32_t CBC_DecodedBitStreamPaser::byteCompaction(int32_t mode, if (mode == BYTE_COMPACTION_MODE_LATCH) { int32_t count = 0; int64_t value = 0; - FX_WORD* decodedData = FX_Alloc(FX_WORD, 6); + uint16_t* decodedData = FX_Alloc(uint16_t, 6); CFX_Int32Array byteCompactedCodewords; byteCompactedCodewords.SetSize(6); FX_BOOL end = FALSE; @@ -383,7 +383,7 @@ int32_t CBC_DecodedBitStreamPaser::byteCompaction(int32_t mode, if ((count % 5 == 0) && (count > 0)) { int32_t j = 0; for (; j < 6; ++j) { - decodedData[5 - j] = (FX_WORD)(value % 256); + decodedData[5 - j] = (uint16_t)(value % 256); value >>= 8; } for (j = 0; j < 6; ++j) { @@ -398,7 +398,7 @@ int32_t CBC_DecodedBitStreamPaser::byteCompaction(int32_t mode, byteCompactedCodewords[count++] = nextCode; } for (int32_t i = 0; i < count; i++) { - result += (FX_CHAR)(FX_WORD)byteCompactedCodewords[i]; + result += (FX_CHAR)(uint16_t)byteCompactedCodewords[i]; } } else if (mode == BYTE_COMPACTION_MODE_LATCH_6) { int32_t count = 0; @@ -422,10 +422,10 @@ int32_t CBC_DecodedBitStreamPaser::byteCompaction(int32_t mode, } } if ((count % 5 == 0) && (count > 0)) { - FX_WORD* decodedData = FX_Alloc(FX_WORD, 6); + uint16_t* decodedData = FX_Alloc(uint16_t, 6); int32_t j = 0; for (; j < 6; ++j) { - decodedData[5 - j] = (FX_WORD)(value & 0xFF); + decodedData[5 - j] = (uint16_t)(value & 0xFF); value >>= 8; } for (j = 0; j < 6; ++j) { |