diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-13 16:43:37 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 14:14:51 +0000 |
commit | 812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 (patch) | |
tree | f0b0607f6b757eb22237527215094bd87b5d03ba /xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp | |
parent | 893822aa5b6254591f8e80fbffcbb4fa6ad849aa (diff) | |
download | pdfium-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_TextEncoder.cpp')
-rw-r--r-- | xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp index e3eb4a8c4e..cc02661c26 100644 --- a/xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp +++ b/xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp @@ -35,61 +35,59 @@ CBC_TextEncoder::~CBC_TextEncoder() {} int32_t CBC_TextEncoder::getEncodingMode() { return TEXT_ENCODATION; } -int32_t CBC_TextEncoder::encodeChar(FX_WCHAR c, - CFX_WideString& sb, - int32_t& e) { +int32_t CBC_TextEncoder::encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e) { if (c == ' ') { - sb += (FX_WCHAR)'\3'; + sb += (wchar_t)'\3'; return 1; } if (c >= '0' && c <= '9') { - sb += (FX_WCHAR)(c - 48 + 4); + sb += (wchar_t)(c - 48 + 4); return 1; } if (c >= 'a' && c <= 'z') { - sb += (FX_WCHAR)(c - 97 + 14); + sb += (wchar_t)(c - 97 + 14); return 1; } if (c <= 0x1f) { - sb += (FX_WCHAR)'\0'; + sb += (wchar_t)'\0'; sb += c; return 2; } if (c >= '!' && c <= '/') { - sb += (FX_WCHAR)'\1'; - sb += (FX_WCHAR)(c - 33); + sb += (wchar_t)'\1'; + sb += (wchar_t)(c - 33); return 2; } if (c >= ':' && c <= '@') { - sb += (FX_WCHAR)'\1'; - sb += (FX_WCHAR)(c - 58 + 15); + sb += (wchar_t)'\1'; + sb += (wchar_t)(c - 58 + 15); return 2; } if (c >= '[' && c <= '_') { - sb += (FX_WCHAR)'\1'; - sb += (FX_WCHAR)(c - 91 + 22); + sb += (wchar_t)'\1'; + sb += (wchar_t)(c - 91 + 22); return 2; } if (c == 0x0060) { - sb += (FX_WCHAR)'\2'; - sb += (FX_WCHAR)(c - 96); + sb += (wchar_t)'\2'; + sb += (wchar_t)(c - 96); return 2; } if (c >= 'A' && c <= 'Z') { - sb += (FX_WCHAR)'\2'; - sb += (FX_WCHAR)(c - 65 + 1); + sb += (wchar_t)'\2'; + sb += (wchar_t)(c - 65 + 1); return 2; } if (c >= '{' && c <= 0x007f) { - sb += (FX_WCHAR)'\2'; - sb += (FX_WCHAR)(c - 123 + 27); + sb += (wchar_t)'\2'; + sb += (wchar_t)(c - 123 + 27); return 2; } if (c >= 0x0080) { - sb += (FX_WCHAR)'\1'; - sb += (FX_WCHAR)0x001e; + sb += (wchar_t)'\1'; + sb += (wchar_t)0x001e; int32_t len = 2; - len += encodeChar((FX_WCHAR)(c - 128), sb, e); + len += encodeChar((wchar_t)(c - 128), sb, e); if (e != BCExceptionNO) return -1; return len; |