summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/oned
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-29 14:03:09 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-29 14:03:09 -0500
commita74e9c9d3b0d98c5d6042d7ca739cd921a4524db (patch)
tree6d19df6011716727dfcc59f4ef902331de813db3 /xfa/src/fxbarcode/oned
parenta5585569e274fcff8ae106e412eb764c2787cb3f (diff)
downloadpdfium-a74e9c9d3b0d98c5d6042d7ca739cd921a4524db.tar.xz
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 .
Diffstat (limited to 'xfa/src/fxbarcode/oned')
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp11
1 files changed, 6 insertions, 5 deletions
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;
}