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

Side by Side Diff: core/fxcrt/fx_basic.h

Issue 2567503002: Replace CFX_FloatArray with std::vector (Closed)
Patch Set: One less pointer Created 4 years 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 | « no previous file | xfa/fgas/layout/fgas_rtfbreak.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 CORE_FXCRT_FX_BASIC_H_ 7 #ifndef CORE_FXCRT_FX_BASIC_H_
8 #define CORE_FXCRT_FX_BASIC_H_ 8 #define CORE_FXCRT_FX_BASIC_H_
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 310 }
311 for (; iStart < (int)m_nSize; iStart++) 311 for (; iStart < (int)m_nSize; iStart++)
312 if (((TYPE*)m_pData)[iStart] == data) { 312 if (((TYPE*)m_pData)[iStart] == data) {
313 return iStart; 313 return iStart;
314 } 314 }
315 return -1; 315 return -1;
316 } 316 }
317 }; 317 };
318 318
319 #ifdef PDF_ENABLE_XFA 319 #ifdef PDF_ENABLE_XFA
320 typedef CFX_ArrayTemplate<FX_FLOAT> CFX_FloatArray;
321 typedef CFX_ArrayTemplate<uint8_t> CFX_ByteArray; 320 typedef CFX_ArrayTemplate<uint8_t> CFX_ByteArray;
322 typedef CFX_ArrayTemplate<int32_t> CFX_Int32Array; 321 typedef CFX_ArrayTemplate<int32_t> CFX_Int32Array;
323 #endif // PDF_ENABLE_XFA 322 #endif // PDF_ENABLE_XFA
324 323
325 template <class DataType, int FixedSize> 324 template <class DataType, int FixedSize>
326 class CFX_FixedBufGrow { 325 class CFX_FixedBufGrow {
327 public: 326 public:
328 explicit CFX_FixedBufGrow(int data_size) { 327 explicit CFX_FixedBufGrow(int data_size) {
329 if (data_size > FixedSize) { 328 if (data_size > FixedSize) {
330 m_pGrowData.reset(FX_Alloc(DataType, data_size)); 329 m_pGrowData.reset(FX_Alloc(DataType, data_size));
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 FX_FLOAT e; 742 FX_FLOAT e;
744 FX_FLOAT f; 743 FX_FLOAT f;
745 FX_FLOAT g; 744 FX_FLOAT g;
746 FX_FLOAT h; 745 FX_FLOAT h;
747 FX_FLOAT i; 746 FX_FLOAT i;
748 }; 747 };
749 748
750 uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits); 749 uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits);
751 750
752 #endif // CORE_FXCRT_FX_BASIC_H_ 751 #endif // CORE_FXCRT_FX_BASIC_H_
OLDNEW
« no previous file with comments | « no previous file | xfa/fgas/layout/fgas_rtfbreak.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698