summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-26 15:09:33 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-26 15:09:33 -0700
commit811a4f617283a3ea22381a293b71d3c68c628905 (patch)
tree317ab838ad97d630a6f4d858319baa9ac4e3c91d /core/src/fpdfapi/fpdf_parser
parentb1abf37585d86df780603a5d8a5a6af4161202a6 (diff)
downloadpdfium-811a4f617283a3ea22381a293b71d3c68c628905.tar.xz
Remove CPDF_Reference::Create(), make logic match master
Makes the files in this CL identical to master, since there are no XFA specifics. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1425663003 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index 2bf529accd..07b1a208d7 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
@@ -521,7 +521,7 @@ void CPDF_Array::SetAt(FX_DWORD i,
pOld->Release();
if (pObj->GetObjNum()) {
ASSERT(pObjs != NULL);
- pObj = CPDF_Reference::Create(pObjs, pObj->GetObjNum());
+ pObj = new CPDF_Reference(pObjs, pObj->GetObjNum());
}
m_Objects.SetAt(i, pObj);
}
@@ -531,7 +531,7 @@ void CPDF_Array::InsertAt(FX_DWORD index,
ASSERT(pObj != NULL);
if (pObj->GetObjNum()) {
ASSERT(pObjs != NULL);
- pObj = CPDF_Reference::Create(pObjs, pObj->GetObjNum());
+ pObj = new CPDF_Reference(pObjs, pObj->GetObjNum());
}
m_Objects.InsertAt(index, pObj);
}
@@ -539,7 +539,7 @@ void CPDF_Array::Add(CPDF_Object* pObj, CPDF_IndirectObjects* pObjs) {
ASSERT(pObj != NULL);
if (pObj->GetObjNum()) {
ASSERT(pObjs != NULL);
- pObj = CPDF_Reference::Create(pObjs, pObj->GetObjNum());
+ pObj = new CPDF_Reference(pObjs, pObj->GetObjNum());
}
m_Objects.Add(pObj);
}
@@ -731,7 +731,7 @@ void CPDF_Dictionary::SetAt(const CFX_ByteStringC& key,
if (pObj) {
if (pObj->GetObjNum()) {
ASSERT(pObjs != NULL);
- pObj = CPDF_Reference::Create(pObjs, pObj->GetObjNum());
+ pObj = new CPDF_Reference(pObjs, pObj->GetObjNum());
}
m_Map.SetAt(key, pObj);
} else {
@@ -967,15 +967,14 @@ FX_BOOL CPDF_Stream::Identical(CPDF_Stream* pOther) const {
IFX_FileRead* pFile = NULL;
uint8_t* pBuf = NULL;
FX_DWORD offset = 0;
- if (m_GenNum != (FX_DWORD)-1) {
- pFile = m_pFile;
- pBuf = pOther->m_pDataBuf;
- offset = m_FileOffset;
- }
if (pOther->m_GenNum != (FX_DWORD)-1) {
pFile = pOther->m_pFile;
pBuf = m_pDataBuf;
offset = pOther->m_FileOffset;
+ } else if (m_GenNum != (FX_DWORD)-1) {
+ pFile = m_pFile;
+ pBuf = pOther->m_pDataBuf;
+ offset = m_FileOffset;
}
if (NULL == pBuf) {
return FALSE;