summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.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_EdifactEncoder.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_EdifactEncoder.cpp')
-rw-r--r--xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
index 7db117d003..2ffc8413a3 100644
--- a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
@@ -37,7 +37,7 @@ int32_t CBC_EdifactEncoder::getEncodingMode() {
void CBC_EdifactEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
CFX_WideString buffer;
while (context.hasMoreCharacters()) {
- FX_WCHAR c = context.getCurrentChar();
+ wchar_t c = context.getCurrentChar();
encodeChar(c, buffer, e);
if (e != BCExceptionNO) {
return;
@@ -58,7 +58,7 @@ void CBC_EdifactEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
}
}
}
- buffer += (FX_WCHAR)31;
+ buffer += (wchar_t)31;
handleEOD(context, buffer, e);
}
void CBC_EdifactEncoder::handleEOD(CBC_EncoderContext& context,
@@ -115,13 +115,11 @@ void CBC_EdifactEncoder::handleEOD(CBC_EncoderContext& context,
}
context.signalEncoderChange(ASCII_ENCODATION);
}
-void CBC_EdifactEncoder::encodeChar(FX_WCHAR c,
- CFX_WideString& sb,
- int32_t& e) {
+void CBC_EdifactEncoder::encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e) {
if (c >= ' ' && c <= '?') {
sb += c;
} else if (c >= '@' && c <= '^') {
- sb += (FX_WCHAR)(c - 64);
+ sb += (wchar_t)(c - 64);
} else {
CBC_HighLevelEncoder::illegalCharacter(c, e);
}
@@ -134,14 +132,14 @@ CFX_WideString CBC_EdifactEncoder::encodeToCodewords(CFX_WideString sb,
e = BCExceptionNoContents;
return CFX_WideString();
}
- FX_WCHAR c1 = sb.GetAt(startPos);
- FX_WCHAR c2 = len >= 2 ? sb.GetAt(startPos + 1) : 0;
- FX_WCHAR c3 = len >= 3 ? sb.GetAt(startPos + 2) : 0;
- FX_WCHAR c4 = len >= 4 ? sb.GetAt(startPos + 3) : 0;
+ wchar_t c1 = sb.GetAt(startPos);
+ wchar_t c2 = len >= 2 ? sb.GetAt(startPos + 1) : 0;
+ wchar_t c3 = len >= 3 ? sb.GetAt(startPos + 2) : 0;
+ wchar_t c4 = len >= 4 ? sb.GetAt(startPos + 3) : 0;
int32_t v = (c1 << 18) + (c2 << 12) + (c3 << 6) + c4;
- FX_WCHAR cw1 = (FX_WCHAR)((v >> 16) & 255);
- FX_WCHAR cw2 = (FX_WCHAR)((v >> 8) & 255);
- FX_WCHAR cw3 = (FX_WCHAR)(v & 255);
+ wchar_t cw1 = (wchar_t)((v >> 16) & 255);
+ wchar_t cw2 = (wchar_t)((v >> 8) & 255);
+ wchar_t cw3 = (wchar_t)(v & 255);
CFX_WideString res;
res += cw1;
if (len >= 2) {