Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1097)

Unified Diff: core/include/fxcrt/fx_basic.h

Issue 1360103002: Get rid of gotos in CPDF_SyntaxParser and FlateUncompress(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_parser.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxcrt/fx_basic.h
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index 7412b8db3cd99d002325d4693b65a6ffd079fc6a..9ed5fbafcf334820bd08d48dff43a7cdf8e60dc8 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 {
« no previous file with comments | « core/include/fpdfapi/fpdf_parser.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698