summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-13 16:43:37 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-14 14:14:51 +0000
commit812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 (patch)
treef0b0607f6b757eb22237527215094bd87b5d03ba /xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
parent893822aa5b6254591f8e80fbffcbb4fa6ad849aa (diff)
downloadpdfium-812e96c2b4c5908a1979da5e27cdcecda0d1dfc9.tar.xz
Replace FX_CHAR and FX_WCHAR with underlying types.
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8 Reviewed-on: https://pdfium-review.googlesource.com/2967 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp')
-rw-r--r--xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
index 00d8fc1615..88a12b23a2 100644
--- a/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
@@ -37,16 +37,15 @@ void CBC_ASCIIEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
int32_t n = CBC_HighLevelEncoder::determineConsecutiveDigitCount(
context.m_msg, context.m_pos);
if (n >= 2) {
- FX_WCHAR code =
- encodeASCIIDigits(context.m_msg.GetAt(context.m_pos),
- context.m_msg.GetAt(context.m_pos + 1), e);
+ wchar_t code = encodeASCIIDigits(context.m_msg.GetAt(context.m_pos),
+ context.m_msg.GetAt(context.m_pos + 1), e);
if (e != BCExceptionNO) {
return;
}
context.writeCodeword(code);
context.m_pos += 2;
} else {
- FX_WCHAR c = context.getCurrentChar();
+ wchar_t c = context.getCurrentChar();
int32_t newMode = CBC_HighLevelEncoder::lookAheadTest(
context.m_msg, context.m_pos, getEncodingMode());
if (newMode != getEncodingMode()) {
@@ -77,21 +76,21 @@ void CBC_ASCIIEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
}
} else if (CBC_HighLevelEncoder::isExtendedASCII(c)) {
context.writeCodeword(CBC_HighLevelEncoder::UPPER_SHIFT);
- context.writeCodeword((FX_WCHAR)(c - 128 + 1));
+ context.writeCodeword((wchar_t)(c - 128 + 1));
context.m_pos++;
} else {
- context.writeCodeword((FX_WCHAR)(c + 1));
+ context.writeCodeword((wchar_t)(c + 1));
context.m_pos++;
}
}
}
-FX_WCHAR CBC_ASCIIEncoder::encodeASCIIDigits(FX_WCHAR digit1,
- FX_WCHAR digit2,
- int32_t& e) {
+wchar_t CBC_ASCIIEncoder::encodeASCIIDigits(wchar_t digit1,
+ wchar_t digit2,
+ int32_t& e) {
if (CBC_HighLevelEncoder::isDigit(digit1) &&
CBC_HighLevelEncoder::isDigit(digit2)) {
int32_t num = (digit1 - 48) * 10 + (digit2 - 48);
- return (FX_WCHAR)(num + 130);
+ return (wchar_t)(num + 130);
}
e = BCExceptionIllegalArgumentNotGigits;
return 0;