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

Unified Diff: xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp

Issue 1726373002: Remove foo != NULL checks in xfa/src/fxbarcode. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 10 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
Index: xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp
index 7ec3df2b087d2e728e528655d592e28cafb681f3..337d21a9e963e4b34c0e4c6524f0a5e93fa8edec 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp
@@ -42,7 +42,7 @@ CBC_QRCoderMode::CBC_QRCoderMode(int32_t* characterCountBitsForVersions,
int32_t bits,
CFX_ByteString name) {
m_characterCountBitsForVersions = characterCountBitsForVersions;
- if (m_characterCountBitsForVersions != NULL) {
+ if (m_characterCountBitsForVersions) {
m_characterCountBitsForVersions[0] = x1;
m_characterCountBitsForVersions[1] = x2;
m_characterCountBitsForVersions[2] = x3;
@@ -51,9 +51,7 @@ CBC_QRCoderMode::CBC_QRCoderMode(int32_t* characterCountBitsForVersions,
m_bits = bits;
}
CBC_QRCoderMode::~CBC_QRCoderMode() {
- if (m_characterCountBitsForVersions != NULL) {
- FX_Free(m_characterCountBitsForVersions);
- }
+ FX_Free(m_characterCountBitsForVersions);
}
void CBC_QRCoderMode::Initialize() {
sBYTE = new CBC_QRCoderMode(FX_Alloc(int32_t, 3), 8, 16, 16, 0x4, "BYTE");
« no previous file with comments | « xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.cpp ('k') | xfa/src/fxbarcode/qrcode/BC_QRDataBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698