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

Side by Side Diff: xfa/fgas/crt/fgas_utils.h

Issue 1995033002: Expand some typedefs to the original types (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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 | « xfa/fde/css/fde_csscache.h ('k') | xfa/fgas/font/fgas_gefont.h » ('j') | 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 #ifndef XFA_FGAS_CRT_FGAS_UTILS_H_ 7 #ifndef XFA_FGAS_CRT_FGAS_UTILS_H_
8 #define XFA_FGAS_CRT_FGAS_UTILS_H_ 8 #define XFA_FGAS_CRT_FGAS_UTILS_H_
9 9
10 #include "core/fxcrt/include/fx_coordinates.h" 10 #include "core/fxcrt/include/fx_coordinates.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 int32_t iCount = -1) { 73 int32_t iCount = -1) {
74 return CFX_BaseArray::Copy(src, iStart, iCount); 74 return CFX_BaseArray::Copy(src, iStart, iCount);
75 } 75 }
76 int32_t RemoveLast(int32_t iCount = -1) { 76 int32_t RemoveLast(int32_t iCount = -1) {
77 return CFX_BaseArray::RemoveLast(iCount); 77 return CFX_BaseArray::RemoveLast(iCount);
78 } 78 }
79 void RemoveAll(FX_BOOL bLeaveMemory = FALSE) { 79 void RemoveAll(FX_BOOL bLeaveMemory = FALSE) {
80 CFX_BaseArray::RemoveAll(bLeaveMemory); 80 CFX_BaseArray::RemoveAll(bLeaveMemory);
81 } 81 }
82 }; 82 };
83 typedef CFX_BaseArrayTemplate<uint32_t> CFDE_DWordArray;
84 83
85 template <class baseType> 84 template <class baseType>
86 class CFX_ObjectBaseArrayTemplate : public CFX_BaseArray { 85 class CFX_ObjectBaseArrayTemplate : public CFX_BaseArray {
87 public: 86 public:
88 CFX_ObjectBaseArrayTemplate(int32_t iGrowSize = 100) 87 CFX_ObjectBaseArrayTemplate(int32_t iGrowSize = 100)
89 : CFX_BaseArray(iGrowSize, sizeof(baseType)) {} 88 : CFX_BaseArray(iGrowSize, sizeof(baseType)) {}
90 ~CFX_ObjectBaseArrayTemplate() { RemoveAll(FALSE); } 89 ~CFX_ObjectBaseArrayTemplate() { RemoveAll(FALSE); }
91 int32_t GetSize() const { return CFX_BaseArray::GetSize(); } 90 int32_t GetSize() const { return CFX_BaseArray::GetSize(); }
92 int32_t GetBlockSize() const { return CFX_BaseArray::GetBlockSize(); } 91 int32_t GetBlockSize() const { return CFX_BaseArray::GetBlockSize(); }
93 int32_t Add(const baseType& element) { 92 int32_t Add(const baseType& element) {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 int32_t iCount = -1) { 267 int32_t iCount = -1) {
269 return CFX_BaseMassArray::Copy(src, iStart, iCount); 268 return CFX_BaseMassArray::Copy(src, iStart, iCount);
270 } 269 }
271 int32_t RemoveLast(int32_t iCount = -1) { 270 int32_t RemoveLast(int32_t iCount = -1) {
272 return CFX_BaseMassArray::RemoveLast(iCount); 271 return CFX_BaseMassArray::RemoveLast(iCount);
273 } 272 }
274 void RemoveAll(FX_BOOL bLeaveMemory = FALSE) { 273 void RemoveAll(FX_BOOL bLeaveMemory = FALSE) {
275 CFX_BaseMassArray::RemoveAll(bLeaveMemory); 274 CFX_BaseMassArray::RemoveAll(bLeaveMemory);
276 } 275 }
277 }; 276 };
278 typedef CFX_MassArrayTemplate<CFX_Rect> CFX_RectMassArray;
279 277
280 template <class baseType> 278 template <class baseType>
281 class CFX_ObjectMassArrayTemplate : public CFX_BaseMassArray { 279 class CFX_ObjectMassArrayTemplate : public CFX_BaseMassArray {
282 public: 280 public:
283 CFX_ObjectMassArrayTemplate(int32_t iChunkSize = 100) 281 CFX_ObjectMassArrayTemplate(int32_t iChunkSize = 100)
284 : CFX_BaseMassArray(iChunkSize, sizeof(baseType)) {} 282 : CFX_BaseMassArray(iChunkSize, sizeof(baseType)) {}
285 ~CFX_ObjectMassArrayTemplate() { RemoveAll(FALSE); } 283 ~CFX_ObjectMassArrayTemplate() { RemoveAll(FALSE); }
286 int32_t GetSize() const { return CFX_BaseMassArray::GetSize(); } 284 int32_t GetSize() const { return CFX_BaseMassArray::GetSize(); }
287 int32_t Add(const baseType& element) { 285 int32_t Add(const baseType& element) {
288 int32_t index = CFX_BaseMassArray::GetSize(); 286 int32_t index = CFX_BaseMassArray::GetSize();
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } 478 }
481 RemoveAll(TRUE); 479 RemoveAll(TRUE);
482 for (int32_t i = iStart; i < iEnd; i++) { 480 for (int32_t i = iStart; i < iEnd; i++) {
483 Push(*src.GetAt(i)); 481 Push(*src.GetAt(i));
484 } 482 }
485 return CFX_BaseStack::GetSize(); 483 return CFX_BaseStack::GetSize();
486 } 484 }
487 }; 485 };
488 486
489 #endif // XFA_FGAS_CRT_FGAS_UTILS_H_ 487 #endif // XFA_FGAS_CRT_FGAS_UTILS_H_
OLDNEW
« no previous file with comments | « xfa/fde/css/fde_csscache.h ('k') | xfa/fgas/font/fgas_gefont.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698