From 28c7844c1ef5ea0c8727b890e9ff56b593119a00 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 12 May 2016 15:52:14 -0700 Subject: Add CFX_ByteStringC::CharAt() to avoid c_str() and casts. Most of the time, we want to operate on chars as if they were unsigned, but there are a few places where we need the default (questionably signed) values. Consolidate the casting in a single place rather than forcing callers to get a char* ptr. BUG=pdfium:493 Review-Url: https://codereview.chromium.org/1972053003 --- xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa/fxbarcode/datamatrix') diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp b/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp index 88a52b9e74..53c5a84656 100644 --- a/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp +++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp @@ -36,9 +36,9 @@ const FX_CHAR CBC_DataMatrixDecodedBitStreamParser::TEXT_BASIC_SET_CHARS[] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; const FX_CHAR CBC_DataMatrixDecodedBitStreamParser::TEXT_SHIFT3_SET_CHARS[] = { - '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', - 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', (FX_CHAR)127}; + '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', 127}; const int32_t CBC_DataMatrixDecodedBitStreamParser::PAD_ENCODE = 0; const int32_t CBC_DataMatrixDecodedBitStreamParser::ASCII_ENCODE = 1; const int32_t CBC_DataMatrixDecodedBitStreamParser::C40_ENCODE = 2; -- cgit v1.2.3