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

Unified Diff: xfa/fxbarcode/datamatrix/BC_ErrorCorrection.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/fwl/theme/widgettp.cpp ('k') | xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
diff --git a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
index f091de08b58c8ad6430dea51cf7599a4ae1aba92..1c20b7c8a1bae36bf898c9419e3c3b36c79b7b28 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;
}
« no previous file with comments | « xfa/fwl/theme/widgettp.cpp ('k') | xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698