| Index: core/include/fxcrt/fx_basic.h
|
| diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
|
| index 62d2a09476bd876078c5876324b6161c884b6470..b85d737327dbc01f887182fc9b80e5d7d1c88a32 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 {
|
|
|