Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp

Issue 1821043003: Remove FX_WORD in favor of uint16_t. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use stdint.h directly, bitfield minefield. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp ('k') | xfa/fxfa/app/xfa_ffwidget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp b/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp
index d52648c68368c876837a47eb669e96085f8e8f38..04246bd5d865d6edb05c76c5cb5aa66a0e7c9048 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) {
« no previous file with comments | « xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp ('k') | xfa/fxfa/app/xfa_ffwidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698