From b8a074711108baf04017d86207e08c19ff327d8e Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 2 Oct 2015 11:26:58 -0700 Subject: Get rid of gotos in CPDF_SyntaxParser and FlateUncompress(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1360103002 . --- core/include/fxcrt/fx_basic.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'core/include/fxcrt') diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 7412b8db3c..9ed5fbafcf 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -936,15 +936,13 @@ class IFX_Pause { template class CFX_AutoRestorer { public: - explicit CFX_AutoRestorer(T* location) { - m_Location = location; - m_OldValue = *location; - } + explicit CFX_AutoRestorer(T* location) + : m_Location(location), m_OldValue(*location) {} ~CFX_AutoRestorer() { *m_Location = m_OldValue; } private: - T* m_Location; - T m_OldValue; + T* const m_Location; + const T m_OldValue; }; struct FxFreeDeleter { -- cgit v1.2.3