From 248cb27e64b3a25230f53fc2f4ab9d483facc5f9 Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 7 Dec 2016 16:01:54 -0800 Subject: Remove CFX_FormatString::Release() Avoid the |delete this| anti-pattern. Remove some checks which don't avoid other segvs anyways. Review-Url: https://codereview.chromium.org/2557173002 --- xfa/fgas/localization/fgas_localeimp.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'xfa/fgas') diff --git a/xfa/fgas/localization/fgas_localeimp.h b/xfa/fgas/localization/fgas_localeimp.h index 66f1767c5c..7389158798 100644 --- a/xfa/fgas/localization/fgas_localeimp.h +++ b/xfa/fgas/localization/fgas_localeimp.h @@ -14,8 +14,7 @@ class CFX_LCNumeric; class CFX_FormatString { public: CFX_FormatString(IFX_LocaleMgr* pLocaleMgr, bool bUseLCID); - - void Release() { delete this; } + ~CFX_FormatString(); void SplitFormatString(const CFX_WideString& wsFormatString, CFX_WideStringArray& wsPatterns); @@ -62,8 +61,6 @@ class CFX_FormatString { bool FormatNull(const CFX_WideString& wsPattern, CFX_WideString& wsOutput); protected: - ~CFX_FormatString(); - IFX_Locale* GetTextFormat(const CFX_WideString& wsPattern, const CFX_WideStringC& wsCategory, CFX_WideString& wsPurgePattern); -- cgit v1.2.3