From 875e98c581952478f3a3ccef9b2f2e3ed06c5346 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 27 Sep 2017 10:53:11 -0400 Subject: 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 Commit-Queue: Ryan Harrison --- fxbarcode/qrcode/BC_QRCoderEncoder.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'fxbarcode/qrcode/BC_QRCoderEncoder.cpp') diff --git a/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/fxbarcode/qrcode/BC_QRCoderEncoder.cpp index c8ee709235..a44dfc39f6 100644 --- a/fxbarcode/qrcode/BC_QRCoderEncoder.cpp +++ b/fxbarcode/qrcode/BC_QRCoderEncoder.cpp @@ -134,7 +134,7 @@ void Append8BitBytes(const ByteString& content, CBC_QRCoderBitVector* bits, ByteString encoding, int32_t& e) { - for (FX_STRSIZE i = 0; i < content.GetLength(); i++) + for (size_t i = 0; i < content.GetLength(); i++) bits->AppendBits(content[i], 8); } @@ -381,7 +381,7 @@ void MergeString(std::vector* result, if (e != BCExceptionNO) return; if (element2.first == CBC_QRCoderMode::sBYTE && tmp >= 0 && - element1.second.GetLength() < static_cast(tmp)) { + element1.second.GetLength() < static_cast(tmp)) { element2.second = element1.second + element2.second; result->erase(result->begin() + i); i--; @@ -400,7 +400,7 @@ void MergeString(std::vector* result, if (e != BCExceptionNO) return; if (element2.first == CBC_QRCoderMode::sBYTE && tmp >= 0 && - element1.second.GetLength() < static_cast(tmp)) { + element1.second.GetLength() < static_cast(tmp)) { element2.second = element1.second + element2.second; result->erase(result->begin() + i); i--; @@ -411,7 +411,7 @@ void MergeString(std::vector* result, if (e != BCExceptionNO) return; if (element2.first == CBC_QRCoderMode::sALPHANUMERIC && tmp >= 0 && - element1.second.GetLength() < static_cast(tmp)) { + element1.second.GetLength() < static_cast(tmp)) { element2.second = element1.second + element2.second; result->erase(result->begin() + i); i--; @@ -425,7 +425,7 @@ void MergeString(std::vector* result, void SplitString(const ByteString& content, std::vector* result) { - FX_STRSIZE index = 0; + size_t index = 0; while (index < content.GetLength()) { uint8_t c = static_cast(content[index]); if (!((c >= 0xA1 && c <= 0xAA) || (c >= 0xB0 && c <= 0xFA))) @@ -437,7 +437,7 @@ void SplitString(const ByteString& content, if (index >= content.GetLength()) return; - FX_STRSIZE flag = index; + size_t flag = index; while (GetAlphaNumericCode(content[index]) == -1 && index < content.GetLength()) { uint8_t c = static_cast(content[index]); @@ -490,7 +490,7 @@ CBC_QRCoderMode* ChooseMode(const ByteString& content, ByteString encoding) { bool hasNumeric = false; bool hasAlphaNumeric = false; - for (FX_STRSIZE i = 0; i < content.GetLength(); i++) { + for (size_t i = 0; i < content.GetLength(); i++) { if (isdigit(content[i])) { hasNumeric = true; } else if (GetAlphaNumericCode(content[i]) != -1) { -- cgit v1.2.3