summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rw-r--r--fxbarcode/qrcode/BC_QRCoderEncoder.cpp18
2 files changed, 11 insertions, 9 deletions
diff --git a/DEPS b/DEPS
index ef2a08994f..ceb53c709b 100644
--- a/DEPS
+++ b/DEPS
@@ -15,7 +15,7 @@ vars = {
'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038',
'icu_revision': '73e24736676b4b438270fda44e5b2c83b49fdd80',
'instrumented_lib_revision': '45f5814b1543e41ea0be54c771e3840ea52cca4a',
- 'pdfium_tests_revision': '146d4c6b67f95ce178d2bd350ea48327486581e0',
+ 'pdfium_tests_revision': '2c5a02609900c6cc67341f67ab49d3073a7081c3',
'skia_revision': '90e3cd78991ef337dbd0023efb30ece864694308',
'tools_memory_revision': '427f10475e1a8d72424c29d00bf689122b738e5d',
'trace_event_revision': '06294c8a4a6f744ef284cd63cfe54dbf61eea290',
diff --git a/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index 29dc69996b..ae9a8ebd14 100644
--- a/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
+++ b/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
@@ -487,8 +487,9 @@ catchException:
qrCode->GetVersion(),
qrCode->GetMaskPattern(), matrix.get(), e);
if (e != BCExceptionNO)
- return qrCode->SetMatrix(std::move(matrix));
+ return;
+ qrCode->SetMatrix(std::move(matrix));
if (!qrCode->IsValid())
e = BCExceptionInvalidQRCode;
}
@@ -523,7 +524,8 @@ void CBC_QRCoderEncoder::Encode(const CFX_WideString& content,
return;
headerAndDataBits.AppendBitVector(&dataBits, e);
if (e != BCExceptionNO)
- return TerminateBits(qrCode->GetNumDataBytes(), &headerAndDataBits, e);
+ return;
+ TerminateBits(qrCode->GetNumDataBytes(), &headerAndDataBits, e);
if (e != BCExceptionNO)
return;
CBC_QRCoderBitVector finalBits;
@@ -547,8 +549,9 @@ void CBC_QRCoderEncoder::Encode(const CFX_WideString& content,
qrCode->GetVersion(),
qrCode->GetMaskPattern(), matrix.get(), e);
if (e != BCExceptionNO)
- return qrCode->SetMatrix(std::move(matrix));
+ return;
+ qrCode->SetMatrix(std::move(matrix));
if (!qrCode->IsValid())
e = BCExceptionInvalidQRCode;
}
@@ -629,9 +632,9 @@ int32_t CBC_QRCoderEncoder::CalculateMaskPenalty(CBC_CommonByteMatrix* matrix) {
CBC_QRCoderMode* CBC_QRCoderEncoder::ChooseMode(const CFX_ByteString& content,
CFX_ByteString encoding) {
- if (encoding.Compare("SHIFT_JIS") == 0) {
+ if (encoding.Compare("SHIFT_JIS") == 0)
return CBC_QRCoderMode::sKANJI;
- }
+
bool hasNumeric = false;
bool hasAlphaNumeric = false;
for (int32_t i = 0; i < content.GetLength(); i++) {
@@ -643,11 +646,10 @@ CBC_QRCoderMode* CBC_QRCoderEncoder::ChooseMode(const CFX_ByteString& content,
return CBC_QRCoderMode::sBYTE;
}
}
- if (hasAlphaNumeric) {
+ if (hasAlphaNumeric)
return CBC_QRCoderMode::sALPHANUMERIC;
- } else if (hasNumeric) {
+ if (hasNumeric)
return CBC_QRCoderMode::sNUMERIC;
- }
return CBC_QRCoderMode::sBYTE;
}