summaryrefslogtreecommitdiff
path: root/core/include/fxcrt
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-02 13:30:25 -0700
committerLei Zhang <thestig@chromium.org>2015-10-02 13:30:25 -0700
commit68bce6cfb69bfdfa9fc75f99d048cd7dbee79ff2 (patch)
treeb8d3119685ef4f3ea24f7653cc857e1ea375d4e4 /core/include/fxcrt
parentea5c4d3929928b318b339231804580d93a6e5f21 (diff)
downloadpdfium-68bce6cfb69bfdfa9fc75f99d048cd7dbee79ff2.tar.xz
Merge to XFA: Get rid of gotos in CPDF_SyntaxParser and FlateUncompress().
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1360103002 . (cherry picked from commit b8a074711108baf04017d86207e08c19ff327d8e) Review URL: https://codereview.chromium.org/1384123002 .
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 62d2a09476..b85d737327 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -1065,15 +1065,13 @@ class CFX_DataFilter {
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 {