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

Unified Diff: xfa/fwl/basewidget/cfx_barcode.cpp

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master 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 | « xfa/fgas/localization/fgas_locale.cpp ('k') | xfa/fwl/basewidget/fwl_caretimp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/basewidget/cfx_barcode.cpp
diff --git a/xfa/fwl/basewidget/cfx_barcode.cpp b/xfa/fwl/basewidget/cfx_barcode.cpp
index 665317989a60b1905642c8e9f550ef4319f530eb..723619fc5ffd9ae6dc0fcfe66175c90d16e2fdc6 100644
--- a/xfa/fwl/basewidget/cfx_barcode.cpp
+++ b/xfa/fwl/basewidget/cfx_barcode.cpp
@@ -46,7 +46,7 @@ CBC_CodeBase* CreateBarCodeEngineObject(BC_TYPE type) {
return new CBC_DataMatrix();
case BC_UNKNOWN:
default:
- return NULL;
+ return nullptr;
}
}
@@ -60,7 +60,7 @@ CFX_Barcode::~CFX_Barcode() {
FX_BOOL CFX_Barcode::Create(BC_TYPE type) {
m_pBCEngine = CreateBarCodeEngineObject(type);
- return m_pBCEngine != NULL;
+ return !!m_pBCEngine;
}
BC_TYPE CFX_Barcode::GetType() {
return m_pBCEngine ? m_pBCEngine->GetType() : BC_UNKNOWN;
@@ -225,7 +225,7 @@ FX_BOOL CFX_Barcode::SetFontColor(FX_ARGB color) {
}
FX_BOOL CFX_Barcode::SetTextLocation(BC_TEXT_LOC location) {
typedef FX_BOOL (CBC_CodeBase::*memptrtype)(BC_TEXT_LOC);
- memptrtype memptr = NULL;
+ memptrtype memptr = nullptr;
switch (GetType()) {
case BC_CODE39:
memptr = (memptrtype)&CBC_Code39::SetTextLocation;
@@ -245,7 +245,7 @@ FX_BOOL CFX_Barcode::SetTextLocation(BC_TEXT_LOC location) {
}
FX_BOOL CFX_Barcode::SetWideNarrowRatio(int32_t ratio) {
typedef FX_BOOL (CBC_CodeBase::*memptrtype)(int32_t);
- memptrtype memptr = NULL;
+ memptrtype memptr = nullptr;
switch (GetType()) {
case BC_CODE39:
memptr = (memptrtype)&CBC_Code39::SetWideNarrowRatio;
@@ -260,7 +260,7 @@ FX_BOOL CFX_Barcode::SetWideNarrowRatio(int32_t ratio) {
}
FX_BOOL CFX_Barcode::SetStartChar(FX_CHAR start) {
typedef FX_BOOL (CBC_CodeBase::*memptrtype)(FX_CHAR);
- memptrtype memptr = NULL;
+ memptrtype memptr = nullptr;
switch (GetType()) {
case BC_CODABAR:
memptr = (memptrtype)&CBC_Codabar::SetStartChar;
@@ -272,7 +272,7 @@ FX_BOOL CFX_Barcode::SetStartChar(FX_CHAR start) {
}
FX_BOOL CFX_Barcode::SetEndChar(FX_CHAR end) {
typedef FX_BOOL (CBC_CodeBase::*memptrtype)(FX_CHAR);
- memptrtype memptr = NULL;
+ memptrtype memptr = nullptr;
switch (GetType()) {
case BC_CODABAR:
memptr = (memptrtype)&CBC_Codabar::SetEndChar;
@@ -284,7 +284,7 @@ FX_BOOL CFX_Barcode::SetEndChar(FX_CHAR end) {
}
FX_BOOL CFX_Barcode::SetVersion(int32_t version) {
typedef FX_BOOL (CBC_CodeBase::*memptrtype)(int32_t);
- memptrtype memptr = NULL;
+ memptrtype memptr = nullptr;
switch (GetType()) {
case BC_QR_CODE:
memptr = (memptrtype)&CBC_QRCode::SetVersion;
@@ -296,7 +296,7 @@ FX_BOOL CFX_Barcode::SetVersion(int32_t version) {
}
FX_BOOL CFX_Barcode::SetErrorCorrectionLevel(int32_t level) {
typedef FX_BOOL (CBC_CodeBase::*memptrtype)(int32_t);
- memptrtype memptr = NULL;
+ memptrtype memptr = nullptr;
switch (GetType()) {
case BC_QR_CODE:
memptr = (memptrtype)&CBC_QRCode::SetErrorCorrectionLevel;
@@ -311,7 +311,7 @@ FX_BOOL CFX_Barcode::SetErrorCorrectionLevel(int32_t level) {
}
FX_BOOL CFX_Barcode::SetTruncated(FX_BOOL truncated) {
typedef void (CBC_CodeBase::*memptrtype)(FX_BOOL);
- memptrtype memptr = NULL;
+ memptrtype memptr = nullptr;
switch (GetType()) {
case BC_PDF417:
memptr = (memptrtype)&CBC_PDF417I::SetTruncated;
« no previous file with comments | « xfa/fgas/localization/fgas_locale.cpp ('k') | xfa/fwl/basewidget/fwl_caretimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698