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

Side by Side Diff: core/fpdfdoc/pdf_vt.h

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: s/NULL/nullptr/ Created 4 years, 6 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 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_FPDFDOC_PDF_VT_H_ 7 #ifndef CORE_FPDFDOC_PDF_VT_H_
8 #define CORE_FPDFDOC_PDF_VT_H_ 8 #define CORE_FPDFDOC_PDF_VT_H_
9 9
10 #include "core/fpdfdoc/cpvt_floatrect.h" 10 #include "core/fpdfdoc/cpvt_floatrect.h"
(...skipping 10 matching lines...) Expand all
21 #define IsFloatEqual(fa, fb) IsFloatZero((fa) - (fb)) 21 #define IsFloatEqual(fa, fb) IsFloatZero((fa) - (fb))
22 22
23 template <class TYPE> 23 template <class TYPE>
24 class CPVT_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { 24 class CPVT_ArrayTemplate : public CFX_ArrayTemplate<TYPE> {
25 public: 25 public:
26 FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; } 26 FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; }
27 TYPE GetAt(int nIndex) const { 27 TYPE GetAt(int nIndex) const {
28 if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) { 28 if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) {
29 return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); 29 return CFX_ArrayTemplate<TYPE>::GetAt(nIndex);
30 } 30 }
31 return NULL; 31 return nullptr;
32 } 32 }
33 void RemoveAt(int nIndex) { 33 void RemoveAt(int nIndex) {
34 if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) { 34 if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) {
35 CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex); 35 CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex);
36 } 36 }
37 } 37 }
38 }; 38 };
39 class CLine final { 39 class CLine final {
40 public: 40 public:
41 CLine(); 41 CLine();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return CPVT_FloatRect(ptLeftTop.x, ptLeftTop.y, ptRightBottom.x, 128 return CPVT_FloatRect(ptLeftTop.x, ptLeftTop.y, ptRightBottom.x,
129 ptRightBottom.y); 129 ptRightBottom.y);
130 } 130 }
131 131
132 private: 132 private:
133 CFX_FloatRect m_rcPlate; 133 CFX_FloatRect m_rcPlate;
134 CPVT_FloatRect m_rcContent; 134 CPVT_FloatRect m_rcContent;
135 }; 135 };
136 136
137 #endif // CORE_FPDFDOC_PDF_VT_H_ 137 #endif // CORE_FPDFDOC_PDF_VT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698