summaryrefslogtreecommitdiff
path: root/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-04-12 18:13:25 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-12 18:13:25 +0000
commit7f821c11081fe90346823333622253ec7949b583 (patch)
tree1fb9d3657d4e2ca3d7d4fda17a547b56749e4661 /fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
parentd7f24d5182df335aab8042e1f71f6e402c427e4b (diff)
downloadpdfium-7f821c11081fe90346823333622253ec7949b583.tar.xz
Tidy up types in CBC_PDF417HighLevelEncoder
Follow up to request in https://pdfium-review.googlesource.com/c/pdfium/+/30190 BUG=chromium:802242 Change-Id: I8fddd78d235a195c9782c3f6ced428de965e85eb Reviewed-on: https://pdfium-review.googlesource.com/30250 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h')
-rw-r--r--fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h b/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
index 5e0ab52961..5b652bd5da 100644
--- a/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
+++ b/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
@@ -38,18 +38,18 @@ class CBC_PDF417HighLevelEncoder {
static int32_t PUNCTUATION[128];
static int32_t encodeText(WideString msg,
- int32_t startpos,
- int32_t count,
+ size_t startpos,
+ size_t count,
WideString& sb,
int32_t initialSubmode);
static void encodeBinary(std::vector<uint8_t>* bytes,
- int32_t startpos,
- int32_t count,
+ size_t startpos,
+ size_t count,
int32_t startmode,
WideString& sb);
static void encodeNumeric(WideString msg,
- int32_t startpos,
- int32_t count,
+ size_t startpos,
+ size_t count,
WideString& sb);
static bool isDigit(wchar_t ch);
static bool isAlphaUpper(wchar_t ch);
@@ -57,14 +57,12 @@ class CBC_PDF417HighLevelEncoder {
static bool isMixed(wchar_t ch);
static bool isPunctuation(wchar_t ch);
static bool isText(wchar_t ch);
- static int32_t determineConsecutiveDigitCount(WideString msg,
- int32_t startpos);
- static int32_t determineConsecutiveTextCount(WideString msg,
- int32_t startpos);
- static int32_t determineConsecutiveBinaryCount(WideString msg,
- std::vector<uint8_t>* bytes,
- int32_t startpos,
- int32_t& e);
+ static size_t determineConsecutiveDigitCount(WideString msg, size_t startpos);
+ static size_t determineConsecutiveTextCount(WideString msg, size_t startpos);
+ static Optional<size_t> determineConsecutiveBinaryCount(
+ WideString msg,
+ std::vector<uint8_t>* bytes,
+ size_t startpos);
friend class PDF417HighLevelEncoder_EncodeNumeric_Test;
friend class PDF417HighLevelEncoder_EncodeBinary_Test;