Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp

Issue 2052413002: Remove redundant make_pair* cast in fxbarcode (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index 812b7926ac707cebbb69fcd5e2460eb1131b0eb5..9935326cc117ca36dbada1b424e9ca69a6e7fc4a 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698