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

Unified Diff: xfa/fgas/layout/fgas_textbreak.h

Issue 2207093005: Use smart pointers for class owned pointers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: one more change Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fgas/font/fgas_gefont.cpp ('k') | xfa/fgas/layout/fgas_textbreak.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/layout/fgas_textbreak.h
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index 3d8e3bdbb8b110af071582455c2da6eb429d7265..366ba80cd04198d7b0bebfcd09034053ca3118f5 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -7,6 +7,8 @@
#ifndef XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
#define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
+#include <memory>
+
#include "core/fxcrt/include/fx_ucd.h"
#include "core/fxge/include/fx_ge.h"
#include "xfa/fgas/crt/fgas_utils.h"
@@ -188,8 +190,8 @@ class CFX_TxtLine {
m_iArabicChars = 0;
}
- CFX_TxtCharArray* m_pLineChars;
- CFX_TxtPieceArray* m_pLinePieces;
+ std::unique_ptr<CFX_TxtCharArray> m_pLineChars;
+ std::unique_ptr<CFX_TxtPieceArray> m_pLinePieces;
int32_t m_iStart;
int32_t m_iWidth;
int32_t m_iArabicChars;
@@ -297,8 +299,8 @@ class CFX_TxtBreak {
int32_t m_iCurAlignment;
FX_BOOL m_bArabicNumber;
FX_BOOL m_bArabicComma;
- CFX_TxtLine* m_pTxtLine1;
- CFX_TxtLine* m_pTxtLine2;
+ std::unique_ptr<CFX_TxtLine> m_pTxtLine1;
+ std::unique_ptr<CFX_TxtLine> m_pTxtLine2;
CFX_TxtLine* m_pCurLine;
int32_t m_iReady;
int32_t m_iTolerance;
« no previous file with comments | « xfa/fgas/font/fgas_gefont.cpp ('k') | xfa/fgas/layout/fgas_textbreak.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698