summaryrefslogtreecommitdiff
path: root/fxbarcode/datamatrix
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/datamatrix
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/datamatrix')
-rw-r--r--fxbarcode/datamatrix/BC_EncoderContext.cpp10
-rw-r--r--fxbarcode/datamatrix/BC_EncoderContext.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/fxbarcode/datamatrix/BC_EncoderContext.cpp b/fxbarcode/datamatrix/BC_EncoderContext.cpp
index 6e1671035a..fe0a497d58 100644
--- a/fxbarcode/datamatrix/BC_EncoderContext.cpp
+++ b/fxbarcode/datamatrix/BC_EncoderContext.cpp
@@ -34,8 +34,8 @@ CBC_EncoderContext::CBC_EncoderContext(const WideString& msg,
ByteString dststr;
CBC_UtilCodingConvert::UnicodeToUTF8(msg, dststr);
WideString sb;
- FX_STRSIZE c = dststr.GetLength();
- for (FX_STRSIZE i = 0; i < c; i++) {
+ size_t c = dststr.GetLength();
+ for (size_t i = 0; i < c; i++) {
wchar_t ch = static_cast<wchar_t>(dststr[i] & 0xff);
if (ch == '?' && dststr[i] != '?') {
e = BCExceptionCharactersOutsideISO88591Encoding;
@@ -73,7 +73,7 @@ void CBC_EncoderContext::writeCodewords(const WideString& codewords) {
void CBC_EncoderContext::writeCodeword(wchar_t codeword) {
m_codewords += codeword;
}
-FX_STRSIZE CBC_EncoderContext::getCodewordCount() {
+size_t CBC_EncoderContext::getCodewordCount() {
return m_codewords.GetLength();
}
void CBC_EncoderContext::signalEncoderChange(int32_t encoding) {
@@ -85,7 +85,7 @@ void CBC_EncoderContext::resetEncoderSignal() {
bool CBC_EncoderContext::hasMoreCharacters() {
return m_pos < getTotalMessageCharCount();
}
-FX_STRSIZE CBC_EncoderContext::getRemainingCharacters() {
+size_t CBC_EncoderContext::getRemainingCharacters() {
return getTotalMessageCharCount() - m_pos;
}
void CBC_EncoderContext::updateSymbolInfo(int32_t& e) {
@@ -103,6 +103,6 @@ void CBC_EncoderContext::resetSymbolInfo() {
m_allowRectangular = true;
}
-FX_STRSIZE CBC_EncoderContext::getTotalMessageCharCount() {
+size_t CBC_EncoderContext::getTotalMessageCharCount() {
return m_msg.GetLength() - m_skipAtEnd;
}
diff --git a/fxbarcode/datamatrix/BC_EncoderContext.h b/fxbarcode/datamatrix/BC_EncoderContext.h
index 3881319d61..c0ddb20b7b 100644
--- a/fxbarcode/datamatrix/BC_EncoderContext.h
+++ b/fxbarcode/datamatrix/BC_EncoderContext.h
@@ -25,26 +25,26 @@ class CBC_EncoderContext {
wchar_t getCurrent();
void writeCodewords(const WideString& codewords);
void writeCodeword(wchar_t codeword);
- FX_STRSIZE getCodewordCount();
+ size_t getCodewordCount();
void signalEncoderChange(int32_t encoding);
void resetEncoderSignal();
bool hasMoreCharacters();
- FX_STRSIZE getRemainingCharacters();
+ size_t getRemainingCharacters();
void updateSymbolInfo(int32_t& e);
void updateSymbolInfo(int32_t len, int32_t& e);
void resetSymbolInfo();
WideString m_msg;
WideString m_codewords;
- FX_STRSIZE m_pos;
+ size_t m_pos;
int32_t m_newEncoding;
UnownedPtr<CBC_SymbolInfo> m_symbolInfo;
private:
- FX_STRSIZE getTotalMessageCharCount();
+ size_t getTotalMessageCharCount();
bool m_allowRectangular; // Force square when false.
- FX_STRSIZE m_skipAtEnd;
+ size_t m_skipAtEnd;
};
#endif // FXBARCODE_DATAMATRIX_BC_ENCODERCONTEXT_H_