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

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

Issue 889673003: Replace CFX_SmartPointer cast operator with Get() method. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Reduce changes to Get() method only. Created 5 years, 10 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 | « no previous file | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('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 _FX_BASIC_H_ 7 #ifndef _FX_BASIC_H_
8 #define _FX_BASIC_H_ 8 #define _FX_BASIC_H_
9 #ifndef _FX_SYSTEM_H_ 9 #ifndef _FX_SYSTEM_H_
10 #include "fx_system.h" 10 #include "fx_system.h"
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 1431
1432 template <class T> 1432 template <class T>
1433 class CFX_SmartPointer 1433 class CFX_SmartPointer
1434 { 1434 {
1435 public: 1435 public:
1436 CFX_SmartPointer(T *pObj) : m_pObj(pObj) {} 1436 CFX_SmartPointer(T *pObj) : m_pObj(pObj) {}
1437 ~CFX_SmartPointer() 1437 ~CFX_SmartPointer()
1438 { 1438 {
1439 m_pObj->Release(); 1439 m_pObj->Release();
1440 } 1440 }
1441 operator T*(void) 1441 T* Get(void)
1442 { 1442 {
1443 return m_pObj; 1443 return m_pObj;
1444 } 1444 }
1445 T& operator *(void) 1445 T& operator *(void)
1446 { 1446 {
1447 return *m_pObj; 1447 return *m_pObj;
1448 } 1448 }
1449 T* operator ->(void) 1449 T* operator ->(void)
1450 { 1450 {
1451 return m_pObj; 1451 return m_pObj;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 FX_FLOAT c; 1649 FX_FLOAT c;
1650 FX_FLOAT d; 1650 FX_FLOAT d;
1651 FX_FLOAT e; 1651 FX_FLOAT e;
1652 FX_FLOAT f; 1652 FX_FLOAT f;
1653 FX_FLOAT g; 1653 FX_FLOAT g;
1654 FX_FLOAT h; 1654 FX_FLOAT h;
1655 FX_FLOAT i; 1655 FX_FLOAT i;
1656 }; 1656 };
1657 1657
1658 #endif 1658 #endif
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698