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

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

Issue 1840483003: Reduce signed/unsigned comparison warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase 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 29 matching lines...) Expand all
40 CPDF_Array* CPDF_Array::AsArray() { 40 CPDF_Array* CPDF_Array::AsArray() {
41 return this; 41 return this;
42 } 42 }
43 43
44 const CPDF_Array* CPDF_Array::AsArray() const { 44 const CPDF_Array* CPDF_Array::AsArray() const {
45 return this; 45 return this;
46 } 46 }
47 47
48 CPDF_Object* CPDF_Array::Clone(FX_BOOL bDirect) const { 48 CPDF_Object* CPDF_Array::Clone(FX_BOOL bDirect) const {
49 CPDF_Array* pCopy = new CPDF_Array(); 49 CPDF_Array* pCopy = new CPDF_Array();
50 for (int i = 0; i < GetCount(); i++) { 50 for (size_t i = 0; i < GetCount(); i++) {
51 CPDF_Object* value = m_Objects.GetAt(i); 51 CPDF_Object* value = m_Objects.GetAt(i);
52 pCopy->m_Objects.Add(value->Clone(bDirect)); 52 pCopy->m_Objects.Add(value->Clone(bDirect));
53 } 53 }
54 return pCopy; 54 return pCopy;
55 } 55 }
56 56
57 CFX_FloatRect CPDF_Array::GetRect() { 57 CFX_FloatRect CPDF_Array::GetRect() {
58 CFX_FloatRect rect; 58 CFX_FloatRect rect;
59 if (!IsArray() || m_Objects.GetSize() != 4) 59 if (!IsArray() || m_Objects.GetSize() != 4)
60 return rect; 60 return rect;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 ASSERT(IsArray()); 198 ASSERT(IsArray());
199 CPDF_Number* pNumber = new CPDF_Number(f); 199 CPDF_Number* pNumber = new CPDF_Number(f);
200 Add(pNumber); 200 Add(pNumber);
201 } 201 }
202 202
203 void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc, 203 void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc,
204 uint32_t objnum) { 204 uint32_t objnum) {
205 ASSERT(IsArray()); 205 ASSERT(IsArray());
206 Add(new CPDF_Reference(pDoc, objnum)); 206 Add(new CPDF_Reference(pDoc, objnum));
207 } 207 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698