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

Unified Diff: xfa/fde/tto/fde_textout.h

Issue 1960673003: Replace some calls to Release() with direct delete, part 1. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add unique ptrs 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 side-by-side diff with in-line comments
Download patch
Index: xfa/fde/tto/fde_textout.h
diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h
index e3e87a780af7d2feee784a1d5bcf72ffb59e8feb..91f03e8d9b81d6c436d02bcaa5ac9656876c5858 100644
--- a/xfa/fde/tto/fde_textout.h
+++ b/xfa/fde/tto/fde_textout.h
@@ -7,6 +7,8 @@
#ifndef XFA_FDE_TTO_FDE_TEXTOUT_H_
#define XFA_FDE_TTO_FDE_TEXTOUT_H_
+#include <memory>
+
#include "core/fxge/include/fx_dib.h"
#include "core/fxge/include/fx_ge.h"
#include "xfa/fde/fde_object.h"
@@ -72,9 +74,8 @@ typedef CFX_ObjectMassArrayTemplate<CFDE_TTOLine> CFDE_TTOLineArray;
class CFDE_TextOut : public CFX_Target {
public:
CFDE_TextOut();
- ~CFDE_TextOut();
+ ~CFDE_TextOut() override;
- void Release() { delete this; }
void SetFont(IFX_Font* pFont);
void SetFontSize(FX_FLOAT fFontSize);
void SetTextColor(FX_ARGB color);
@@ -179,7 +180,7 @@ class CFDE_TextOut : public CFX_Target {
int32_t m_iTotalLines;
FXTEXT_CHARPOS* m_pCharPos;
int32_t m_iCharPosSize;
- CFDE_RenderDevice* m_pRenderDevice;
+ std::unique_ptr<CFDE_RenderDevice> m_pRenderDevice;
CFX_Int32Array m_hotKeys;
CFX_RectFArray m_rectArray;
};

Powered by Google App Engine
This is Rietveld 408576698