summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
commit96660d6f382204339d6b1aadc3913303d436e252 (patch)
treeb5f84756e1a89251831cebc05b9d4e1f6cb2027b /core/src/fpdfapi/fpdf_parser
parentd983b09c3ae29a97cba8e9ec9c6351545f6087ee (diff)
downloadpdfium-96660d6f382204339d6b1aadc3913303d436e252.tar.xz
Merge to XFA: Get rid of most instance of 'foo != NULL'
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp7
2 files changed, 3 insertions, 6 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
index 2d7c4b0eec..6625cce2e6 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
@@ -9,7 +9,7 @@
CPDF_Document::CPDF_Document(CPDF_Parser* pParser)
: CPDF_IndirectObjects(pParser) {
- ASSERT(pParser != NULL);
+ ASSERT(pParser);
m_pRootDict = NULL;
m_pInfoDict = NULL;
m_bLinearized = FALSE;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index 857e19c28f..58b03c1887 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);