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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp

Issue 1607473008: Merge to XFA: Remove an extra "const" in fpdf_objects. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_objects.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/include/fpdfapi/fpdf_objects.h" 7 #include "core/include/fpdfapi/fpdf_objects.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 28 matching lines...) Expand all
39 delete AsDictionary(); 39 delete AsDictionary();
40 break; 40 break;
41 case PDFOBJ_STREAM: 41 case PDFOBJ_STREAM:
42 delete AsStream(); 42 delete AsStream();
43 break; 43 break;
44 default: 44 default:
45 delete this; 45 delete this;
46 } 46 }
47 } 47 }
48 48
49 const CPDF_Object* const CPDF_Object::GetBasicObject() const { 49 const CPDF_Object* CPDF_Object::GetBasicObject() const {
50 const CPDF_Reference* pRef = AsReference(); 50 const CPDF_Reference* pRef = AsReference();
51 if (!pRef) { 51 if (!pRef) {
52 // This is not an indirect reference. 52 // This is not an indirect reference.
53 return this; 53 return this;
54 } 54 }
55 if (!pRef->m_pObjList) 55 if (!pRef->m_pObjList)
56 return nullptr; 56 return nullptr;
57 return pRef->m_pObjList->GetIndirectObject(pRef->GetRefObjNum(), nullptr); 57 return pRef->m_pObjList->GetIndirectObject(pRef->GetRefObjNum(), nullptr);
58 } 58 }
59 59
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 pObj->Destroy(); 1098 pObj->Destroy();
1099 return FALSE; 1099 return FALSE;
1100 } 1100 }
1101 it->second->Destroy(); 1101 it->second->Destroy();
1102 } 1102 }
1103 pObj->m_ObjNum = objnum; 1103 pObj->m_ObjNum = objnum;
1104 m_IndirectObjs[objnum] = pObj; 1104 m_IndirectObjs[objnum] = pObj;
1105 m_LastObjNum = std::max(m_LastObjNum, objnum); 1105 m_LastObjNum = std::max(m_LastObjNum, objnum);
1106 return TRUE; 1106 return TRUE;
1107 } 1107 }
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698