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

Unified Diff: core/src/fpdfapi/fpdf_font/ttgsubtable.h

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits 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
« no previous file with comments | « core/src/fpdfapi/fpdf_font/fpdf_font.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_font/ttgsubtable.h
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.h b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
index e3c996565460789a204d6844e03785a0f8c03fdf..605d25fd579dd1adf3c92f0657a32663df870f4d 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.h
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
@@ -277,10 +277,9 @@ class CFX_CTTGSUBTable {
TLookup()
: LookupType(0), LookupFlag(0), SubTableCount(0), SubTable(NULL) {}
~TLookup() {
- if (SubTableCount > 0 && SubTable != NULL) {
- for (int i = 0; i < SubTableCount; i++) {
+ if (SubTable) {
+ for (int i = 0; i < SubTableCount; ++i)
delete SubTable[i];
- }
delete[] SubTable;
}
}
« no previous file with comments | « core/src/fpdfapi/fpdf_font/fpdf_font.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698