summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-06-10 13:26:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-10 13:26:33 -0700
commitbbf27133e72cdd824188acd309dfc2517cfcf026 (patch)
tree9d34c3aa3139f3bb77f52890626ba896e37f722c /xfa
parentc14c958db677802a52e84a0e772f6185eb89b3fd (diff)
downloadpdfium-bbf27133e72cdd824188acd309dfc2517cfcf026.tar.xz
Remove redundant make_pair* cast in fxbarcode
Review-Url: https://codereview.chromium.org/2052413002
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index 812b7926ac..9935326cc1 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
@@ -95,20 +95,19 @@ void CBC_QRCoderEncoder::AppendDataModeLenghInfo(
CFX_ByteString& encoding,
int32_t& e) {
for (int32_t i = 0; i < splitResult.GetSize(); i++) {
- tempMode = ((Make_Pair*)splitResult[i])->m_mode;
+ tempMode = splitResult[i]->m_mode;
if (tempMode == CBC_QRCoderMode::sGBK) {
AppendModeInfo(tempMode, &headerAndDataBits, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- AppendLengthInfo(((Make_Pair*)splitResult[i])->m_string.GetLength(),
+ AppendLengthInfo(splitResult[i]->m_string.GetLength(),
qrCode->GetVersion(), tempMode, &headerAndDataBits, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- AppendBytes(((Make_Pair*)splitResult[i])->m_string, tempMode,
- &headerAndDataBits, encoding, e);
+ AppendBytes(splitResult[i]->m_string, tempMode, &headerAndDataBits,
+ encoding, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
} else if (tempMode == CBC_QRCoderMode::sBYTE) {
CFX_ByteArray bytes;
- CBC_UtilCodingConvert::LocaleToUtf8(
- ((Make_Pair*)splitResult[i])->m_string, bytes);
+ CBC_UtilCodingConvert::LocaleToUtf8(splitResult[i]->m_string, bytes);
AppendModeInfo(tempMode, &headerAndDataBits, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
AppendLengthInfo(bytes.GetSize(), qrCode->GetVersion(), tempMode,
@@ -119,20 +118,20 @@ void CBC_QRCoderEncoder::AppendDataModeLenghInfo(
} else if (tempMode == CBC_QRCoderMode::sALPHANUMERIC) {
AppendModeInfo(tempMode, &headerAndDataBits, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- AppendLengthInfo(((Make_Pair*)splitResult[i])->m_string.GetLength(),
+ AppendLengthInfo(splitResult[i]->m_string.GetLength(),
qrCode->GetVersion(), tempMode, &headerAndDataBits, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- AppendBytes(((Make_Pair*)splitResult[i])->m_string, tempMode,
- &headerAndDataBits, encoding, e);
+ AppendBytes(splitResult[i]->m_string, tempMode, &headerAndDataBits,
+ encoding, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
} else if (tempMode == CBC_QRCoderMode::sNUMERIC) {
AppendModeInfo(tempMode, &headerAndDataBits, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- AppendLengthInfo(((Make_Pair*)splitResult[i])->m_string.GetLength(),
+ AppendLengthInfo(splitResult[i]->m_string.GetLength(),
qrCode->GetVersion(), tempMode, &headerAndDataBits, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- AppendBytes(((Make_Pair*)splitResult[i])->m_string, tempMode,
- &headerAndDataBits, encoding, e);
+ AppendBytes(splitResult[i]->m_string, tempMode, &headerAndDataBits,
+ encoding, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
} else {
e = BCExceptionUnknown;