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

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

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: 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_objects.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index 857e19c28fea291ab0b103d1bfcb8f595b13dcfe..58b03c1887410a6acbd2fa440ec81bc097bb1079 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
@@ -161,7 +161,6 @@ CPDF_Array* CPDF_Object::GetArray() const {
return const_cast<CPDF_Array*>(AsArray());
}
void CPDF_Object::SetString(const CFX_ByteString& str) {
- ASSERT(this != NULL);
switch (m_Type) {
case PDFOBJ_BOOLEAN:
AsBoolean()->m_bValue = (str == "true");
@@ -526,17 +525,15 @@ void CPDF_Array::SetAt(FX_DWORD i,
void CPDF_Array::InsertAt(FX_DWORD index,
CPDF_Object* pObj,
CPDF_IndirectObjects* pObjs) {
- ASSERT(pObj != NULL);
if (pObj->GetObjNum()) {
- ASSERT(pObjs != NULL);
+ ASSERT(pObjs);
pObj = new CPDF_Reference(pObjs, pObj->GetObjNum());
}
m_Objects.InsertAt(index, pObj);
}
void CPDF_Array::Add(CPDF_Object* pObj, CPDF_IndirectObjects* pObjs) {
- ASSERT(pObj != NULL);
if (pObj->GetObjNum()) {
- ASSERT(pObjs != NULL);
+ ASSERT(pObjs);
pObj = new CPDF_Reference(pObjs, pObj->GetObjNum());
}
m_Objects.Add(pObj);

Powered by Google App Engine
This is Rietveld 408576698