summaryrefslogtreecommitdiff
path: root/core/include/fxcrt
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-02 11:26:58 -0700
committerLei Zhang <thestig@chromium.org>2015-10-02 11:26:58 -0700
commitb8a074711108baf04017d86207e08c19ff327d8e (patch)
tree54fe26a1f9c44d306e70b5b0e594f6629dd40096 /core/include/fxcrt
parent9fb70fbded5c0bf4f5313a49fd3496b4d4fa71ca (diff)
downloadpdfium-b8a074711108baf04017d86207e08c19ff327d8e.tar.xz
Get rid of gotos in CPDF_SyntaxParser and FlateUncompress().
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1360103002 .
Diffstat (limited to 'core/include/fxcrt')
-rw-r--r--core/include/fxcrt/fx_basic.h10
1 files changed, 4 insertions, 6 deletions
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 <typename T>
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 {