From ff8347a4b16f000be628c5e10d03a1e1c17537eb Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 17 Jun 2015 16:38:51 -0700 Subject: Replace some Release() calls with virtual destructors. A virtual method that does |delete this| is an anti-pattern. Some classes can be de-virtualized instead. Throw in some unique_ptrs and delete dead code for good measure. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1192013002. --- core/include/fxcrt/fx_arb.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'core/include/fxcrt/fx_arb.h') diff --git a/core/include/fxcrt/fx_arb.h b/core/include/fxcrt/fx_arb.h index 3485ce27bb..7ce21e5086 100644 --- a/core/include/fxcrt/fx_arb.h +++ b/core/include/fxcrt/fx_arb.h @@ -12,16 +12,14 @@ class IFX_BidiChar { public: - static IFX_BidiChar* Create(); - virtual void Release() = 0; - virtual void SetPolicy(FX_BOOL bSeparateNeutral = TRUE) = 0; - virtual FX_BOOL AppendChar(FX_WCHAR wch) = 0; - virtual FX_BOOL EndChar() = 0; - virtual int32_t GetBidiInfo(int32_t &iStart, int32_t &iCount) = 0; - virtual void Reset() = 0; + static IFX_BidiChar* Create(); + virtual ~IFX_BidiChar() {} -protected: - ~IFX_BidiChar() { } + virtual void SetPolicy(FX_BOOL bSeparateNeutral = TRUE) = 0; + virtual FX_BOOL AppendChar(FX_WCHAR wch) = 0; + virtual FX_BOOL EndChar() = 0; + virtual int32_t GetBidiInfo(int32_t &iStart, int32_t &iCount) = 0; + virtual void Reset() = 0; }; #endif // CORE_INCLUDE_FXCRT_FX_ARB_H_ -- cgit v1.2.3