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

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: rebase Created 5 years 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: core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index 5fbdcc634c1c9aa5222d5fec57effd377a5635d9..c855a7c5c2eab3611a9ff0d6dacb090a03d28c31 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -454,7 +454,7 @@ CFX_WideString PDF_DecodeText(const uint8_t* src_data,
}
}
result.ReleaseBuffer(dest_pos);
- } else if (pCharMap == NULL) {
+ } else if (!pCharMap) {
FX_WCHAR* dest_buf = result.GetBuffer(src_len);
for (FX_DWORD i = 0; i < src_len; i++) {
dest_buf[i] = PDFDocEncoding[src_data[i]];
@@ -473,7 +473,7 @@ CFX_ByteString PDF_EncodeText(const FX_WCHAR* pString,
len = FXSYS_wcslen(pString);
}
CFX_ByteString result;
- if (pCharMap == NULL) {
+ if (!pCharMap) {
FX_CHAR* dest_buf1 = result.GetBuffer(len);
int i;
for (i = 0; i < len; i++) {
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698