| Index: core/include/fxcrt/fx_basic.h
|
| diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
|
| index 3e556f5439230ed086574ec5d11a71254178e28c..c62a456982c1bde3cbeb3f94088a50b98a71bbdf 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;
|
| };
|
|
|
| // Used with nonstd::unique_ptr to Release() objects that can't be deleted.
|
|
|