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

Side by Side Diff: core/fpdfapi/fpdf_parser/cpdf_array.cpp

Issue 1879683002: Remove CPDF_Object::GetConstString and overrides (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Move bLuminosity down. Created 4 years, 8 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
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/fpdfapi/fpdf_parser/include/cpdf_array.h" 7 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
8 8
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_name.h" 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_name.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return nullptr; 85 return nullptr;
86 return m_Objects.at(i)->GetDirect(); 86 return m_Objects.at(i)->GetDirect();
87 } 87 }
88 88
89 CFX_ByteString CPDF_Array::GetStringAt(size_t i) const { 89 CFX_ByteString CPDF_Array::GetStringAt(size_t i) const {
90 if (i >= m_Objects.size()) 90 if (i >= m_Objects.size())
91 return CFX_ByteString(); 91 return CFX_ByteString();
92 return m_Objects.at(i)->GetString(); 92 return m_Objects.at(i)->GetString();
93 } 93 }
94 94
95 CFX_ByteStringC CPDF_Array::GetConstStringAt(size_t i) const {
96 if (i >= m_Objects.size())
97 return CFX_ByteStringC();
98 return m_Objects.at(i)->GetConstString();
99 }
100
101 int CPDF_Array::GetIntegerAt(size_t i) const { 95 int CPDF_Array::GetIntegerAt(size_t i) const {
102 if (i >= m_Objects.size()) 96 if (i >= m_Objects.size())
103 return 0; 97 return 0;
104 return m_Objects.at(i)->GetInteger(); 98 return m_Objects.at(i)->GetInteger();
105 } 99 }
106 100
107 FX_FLOAT CPDF_Array::GetNumberAt(size_t i) const { 101 FX_FLOAT CPDF_Array::GetNumberAt(size_t i) const {
108 if (i >= m_Objects.size()) 102 if (i >= m_Objects.size())
109 return 0; 103 return 0;
110 return m_Objects.at(i)->GetNumber(); 104 return m_Objects.at(i)->GetNumber();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 ASSERT(IsArray()); 197 ASSERT(IsArray());
204 CPDF_Number* pNumber = new CPDF_Number(f); 198 CPDF_Number* pNumber = new CPDF_Number(f);
205 Add(pNumber); 199 Add(pNumber);
206 } 200 }
207 201
208 void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc, 202 void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc,
209 uint32_t objnum) { 203 uint32_t objnum) {
210 ASSERT(IsArray()); 204 ASSERT(IsArray());
211 Add(new CPDF_Reference(pDoc, objnum)); 205 Add(new CPDF_Reference(pDoc, objnum));
212 } 206 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698