summaryrefslogtreecommitdiff
path: root/fxbarcode/oned/BC_OnedCode39Writer.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-27 10:53:11 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-27 16:11:38 +0000
commit875e98c581952478f3a3ccef9b2f2e3ed06c5346 (patch)
tree8e0d7e032056bf4c73d6da43c0f3ce4eadb74dfd /fxbarcode/oned/BC_OnedCode39Writer.cpp
parentcc3a3ee3ebcc1baabdfa7ffca5876dbbfa3980c1 (diff)
downloadpdfium-875e98c581952478f3a3ccef9b2f2e3ed06c5346.tar.xz
Remove FX_STRSIZE and replace with size_t
BUG=pdfium:828 Change-Id: I5c40237433ebabaeabdb43aec9cdf783e41dfe16 Reviewed-on: https://pdfium-review.googlesource.com/13230 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fxbarcode/oned/BC_OnedCode39Writer.cpp')
-rw-r--r--fxbarcode/oned/BC_OnedCode39Writer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/fxbarcode/oned/BC_OnedCode39Writer.cpp b/fxbarcode/oned/BC_OnedCode39Writer.cpp
index 2e02e01583..8adef14765 100644
--- a/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -49,7 +49,7 @@ CBC_OnedCode39Writer::~CBC_OnedCode39Writer() {}
bool CBC_OnedCode39Writer::CheckContentValidity(
const WideStringView& contents) {
- for (FX_STRSIZE i = 0; i < contents.GetLength(); i++) {
+ for (size_t i = 0; i < contents.GetLength(); i++) {
wchar_t ch = contents[i];
if ((ch >= L'0' && ch <= L'9') || (ch >= L'A' && ch <= L'Z') ||
ch == L'-' || ch == L'.' || ch == L' ' || ch == L'*' || ch == L'$' ||
@@ -64,7 +64,7 @@ bool CBC_OnedCode39Writer::CheckContentValidity(
WideString CBC_OnedCode39Writer::FilterContents(
const WideStringView& contents) {
WideString filtercontents;
- for (FX_STRSIZE i = 0; i < contents.GetLength(); i++) {
+ for (size_t i = 0; i < contents.GetLength(); i++) {
wchar_t ch = contents[i];
if (ch == L'*' && (i == 0 || i == contents.GetLength() - 1)) {
continue;
@@ -87,7 +87,7 @@ WideString CBC_OnedCode39Writer::FilterContents(
WideString CBC_OnedCode39Writer::RenderTextContents(
const WideStringView& contents) {
WideString renderContents;
- for (FX_STRSIZE i = 0; i < contents.GetLength(); i++) {
+ for (size_t i = 0; i < contents.GetLength(); i++) {
wchar_t ch = contents[i];
if (ch == L'*' && (i == 0 || i == contents.GetLength() - 1)) {
continue;
@@ -138,8 +138,7 @@ void CBC_OnedCode39Writer::ToIntArray(int32_t a, int8_t* toReturn) {
}
char CBC_OnedCode39Writer::CalcCheckSum(const ByteString& contents) {
- FX_STRSIZE length = contents.GetLength();
- if (length > 80)
+ if (contents.GetLength() > 80)
return '*';
int32_t checksum = 0;
@@ -176,7 +175,7 @@ uint8_t* CBC_OnedCode39Writer::EncodeImpl(const ByteString& contents,
int32_t codeWidth = (wideStrideNum * m_iWideNarrRatio + narrStrideNum) * 2 +
1 + m_iContentLen;
size_t len = strlen(ALPHABET_STRING);
- for (FX_STRSIZE j = 0; j < m_iContentLen; j++) {
+ for (size_t j = 0; j < m_iContentLen; j++) {
for (size_t i = 0; i < len; i++) {
if (ALPHABET_STRING[i] != encodedContents[j])
continue;