summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
commitbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (patch)
tree4cfbe682869d89900f33751c37f6a84865beeb0a /xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp
parentb116136da234afcad018bb44a3ccb64b9ad2a554 (diff)
downloadpdfium-bfa9a824a20f37c2dd7111012b46c929cf2ed8a0.tar.xz
Merge to XFA: Use stdint.h types throughout PDFium.
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
Diffstat (limited to 'xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp')
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp
index 48e24681df..4b5de72939 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp
@@ -32,25 +32,25 @@ CBC_OnedEAN8Reader::CBC_OnedEAN8Reader()
CBC_OnedEAN8Reader::~CBC_OnedEAN8Reader()
{
}
-FX_INT32 CBC_OnedEAN8Reader::DecodeMiddle(CBC_CommonBitArray *row, CFX_Int32Array *startRange, CFX_ByteString &resultResult, FX_INT32 &e)
+int32_t CBC_OnedEAN8Reader::DecodeMiddle(CBC_CommonBitArray *row, CFX_Int32Array *startRange, CFX_ByteString &resultResult, int32_t &e)
{
CFX_Int32Array counters;
counters.Add(0);
counters.Add(0);
counters.Add(0);
counters.Add(0);
- FX_INT32 end = row->GetSize();
- FX_INT32 rowOffset = (*startRange)[1];
- FX_INT32 rowOffsetLeft = rowOffset;
- for (FX_INT32 x = 0; x < 4 && rowOffset < end; x++) {
- FX_INT32 bestMatch = DecodeDigit(row, &counters, rowOffset, &(CBC_OneDimReader::L_PATTERNS[0][0]), 10, e);
+ int32_t end = row->GetSize();
+ int32_t rowOffset = (*startRange)[1];
+ int32_t rowOffsetLeft = rowOffset;
+ for (int32_t x = 0; x < 4 && rowOffset < end; x++) {
+ int32_t bestMatch = DecodeDigit(row, &counters, rowOffset, &(CBC_OneDimReader::L_PATTERNS[0][0]), 10, e);
BC_EXCEPTION_CHECK_ReturnValue(e, 0);
resultResult += (FX_CHAR) ('0' + bestMatch);
- for (FX_INT32 i = 0; i < counters.GetSize(); i++) {
+ for (int32_t i = 0; i < counters.GetSize(); i++) {
rowOffset += counters[i];
}
}
- FX_INT32 RowOffsetLen = (rowOffset - rowOffsetLeft) / 4;
+ int32_t RowOffsetLen = (rowOffset - rowOffsetLeft) / 4;
CFX_Int32Array result;
result.Add(CBC_OneDimReader::MIDDLE_PATTERN[0]);
result.Add(CBC_OneDimReader::MIDDLE_PATTERN[1]);
@@ -59,7 +59,7 @@ FX_INT32 CBC_OnedEAN8Reader::DecodeMiddle(CBC_CommonBitArray *row, CFX_Int32Arra
result.Add(CBC_OneDimReader::MIDDLE_PATTERN[4]);
CFX_Int32Array *middleRange = FindGuardPattern(row, rowOffset, TRUE, &result, e);
BC_EXCEPTION_CHECK_ReturnValue(e, 0);
- FX_INT32 rowOffsetMid = rowOffset;
+ int32_t rowOffsetMid = rowOffset;
rowOffset = (*middleRange)[1];
if((rowOffset - rowOffsetMid) > RowOffsetLen) {
e = BCExceptionNotFound;
@@ -69,11 +69,11 @@ FX_INT32 CBC_OnedEAN8Reader::DecodeMiddle(CBC_CommonBitArray *row, CFX_Int32Arra
delete middleRange;
middleRange = NULL;
}
- for (FX_INT32 y = 0; y < 4 && rowOffset < end; y++) {
- FX_INT32 bestMatch = DecodeDigit(row, & counters, rowOffset, &(CBC_OneDimReader::L_PATTERNS[0][0]), 10, e);
+ for (int32_t y = 0; y < 4 && rowOffset < end; y++) {
+ int32_t bestMatch = DecodeDigit(row, & counters, rowOffset, &(CBC_OneDimReader::L_PATTERNS[0][0]), 10, e);
BC_EXCEPTION_CHECK_ReturnValue(e, 0);
resultResult += (FX_CHAR) ('0' + bestMatch);
- for (FX_INT32 i = 0; i < counters.GetSize(); i++) {
+ for (int32_t i = 0; i < counters.GetSize(); i++) {
rowOffset += counters[i];
}
}