From a74e9c9d3b0d98c5d6042d7ca739cd921a4524db Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 29 Feb 2016 14:03:09 -0500 Subject: Using size_t to silence warnings. Change a couple int32_t's to size_t in order to fix warnings on OSX. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1747793002 . --- xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp') diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp index f056c17616..5d363814af 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp @@ -42,7 +42,7 @@ CBC_OnedCodaBarWriter::CBC_OnedCodaBarWriter() { } CBC_OnedCodaBarWriter::~CBC_OnedCodaBarWriter() {} FX_BOOL CBC_OnedCodaBarWriter::SetStartChar(FX_CHAR start) { - for (int32_t i = 0; i < sizeof(START_END_CHARS) / sizeof(FX_CHAR); i++) { + for (size_t i = 0; i < FX_ArraySize(START_END_CHARS); ++i) { if (START_END_CHARS[i] == start) { m_chStart = start; return TRUE; @@ -50,8 +50,9 @@ FX_BOOL CBC_OnedCodaBarWriter::SetStartChar(FX_CHAR start) { } return FALSE; } + FX_BOOL CBC_OnedCodaBarWriter::SetEndChar(FX_CHAR end) { - for (int32_t i = 0; i < sizeof(START_END_CHARS) / sizeof(FX_CHAR); i++) { + for (size_t i = 0; i < FX_ArraySize(START_END_CHARS); ++i) { if (START_END_CHARS[i] == end) { m_chEnd = end; return TRUE; @@ -78,19 +79,19 @@ FX_BOOL CBC_OnedCodaBarWriter::SetWideNarrowRatio(int32_t ratio) { } FX_BOOL CBC_OnedCodaBarWriter::FindChar(FX_WCHAR ch, FX_BOOL isContent) { if (isContent) { - for (int32_t i = 0; i < sizeof(CONTENT_CHARS) / sizeof(FX_CHAR); i++) { + for (size_t i = 0; i < FX_ArraySize(CONTENT_CHARS); ++i) { if (ch == (FX_WCHAR)CONTENT_CHARS[i]) { return TRUE; } } - for (int32_t j = 0; j < sizeof(START_END_CHARS) / sizeof(FX_CHAR); j++) { + for (size_t j = 0; j < FX_ArraySize(START_END_CHARS); ++j) { if (ch == (FX_WCHAR)START_END_CHARS[j]) { return TRUE; } } return FALSE; } else { - for (int32_t i = 0; i < sizeof(CONTENT_CHARS) / sizeof(FX_CHAR); i++) { + for (size_t i = 0; i < FX_ArraySize(CONTENT_CHARS); ++i) { if (ch == (FX_WCHAR)CONTENT_CHARS[i]) { return TRUE; } -- cgit v1.2.3