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

Unified Diff: xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp

Issue 1726373002: Remove foo != NULL checks in xfa/src/fxbarcode. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: 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/common/BC_WhiteRectangleDetector.cpp
diff --git a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp
index 13b852c1f7406dd4a6e44a18058119bb758af198..d1e3eab653dede27437274c5d8a006219171bd39 100644
--- a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp
+++ b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp
@@ -127,7 +127,7 @@ CFX_PtrArray* CBC_WhiteRectangleDetector::Detect(int32_t& e) {
z = CBC_AutoPtr<CBC_ResultPoint>(
GetBlackPointOnSegment((FX_FLOAT)left, (FX_FLOAT)(down - i),
(FX_FLOAT)(left + i), (FX_FLOAT)(down)));
- if (z.get() != NULL) {
+ if (z.get()) {
break;
}
}
@@ -140,7 +140,7 @@ CFX_PtrArray* CBC_WhiteRectangleDetector::Detect(int32_t& e) {
t = CBC_AutoPtr<CBC_ResultPoint>(
GetBlackPointOnSegment((FX_FLOAT)left, (FX_FLOAT)(up + j),
(FX_FLOAT)(left + j), (FX_FLOAT)up));
- if (t.get() != NULL) {
+ if (t.get()) {
break;
}
}
@@ -153,7 +153,7 @@ CFX_PtrArray* CBC_WhiteRectangleDetector::Detect(int32_t& e) {
x = CBC_AutoPtr<CBC_ResultPoint>(
GetBlackPointOnSegment((FX_FLOAT)right, (FX_FLOAT)(up + k),
(FX_FLOAT)(right - k), (FX_FLOAT)up));
- if (x.get() != NULL) {
+ if (x.get()) {
break;
}
}
@@ -166,7 +166,7 @@ CFX_PtrArray* CBC_WhiteRectangleDetector::Detect(int32_t& e) {
y = CBC_AutoPtr<CBC_ResultPoint>(
GetBlackPointOnSegment((FX_FLOAT)right, (FX_FLOAT)(down - m),
(FX_FLOAT)(right - m), (FX_FLOAT)down));
- if (y.get() != NULL) {
+ if (y.get()) {
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698