summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_gui.h19
-rw-r--r--src/mir_core/src/CCtrlBase.cpp10
2 files changed, 6 insertions, 23 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index 41fc37a9a7..28cc1dc958 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -104,7 +104,7 @@ struct CMDBTraits<8>
}
};
-class CMOptionBase
+class CMOptionBase : public MNonCopyable
{
public:
__forceinline const char* GetDBModuleName() const { return m_szModuleName; }
@@ -121,10 +121,6 @@ protected:
char *m_szModuleName;
char *m_szSetting;
-
-private:
- CMOptionBase(const CMOptionBase &) {}
- void operator= (const CMOptionBase &) {}
};
template<class T>
@@ -159,9 +155,6 @@ public:
private:
Type m_default;
-
- CMOption(const CMOption &) : CMOptionBase(NULL, NULL, DBVT_DELETED) {}
- void operator= (const CMOption &) {}
};
#ifdef M_SYSTEM_CPP_H__
@@ -202,9 +195,6 @@ public:
private:
const Type *m_default;
mir_ptr<Type> m_value;
-
- CMOption(const CMOption &) : CMOptionBase((char*)nullptr, nullptr) {}
- void operator= (const CMOption &) {}
};
template<>
@@ -243,9 +233,6 @@ public:
private:
const Type *m_default;
mir_ptr<Type> m_value;
-
- CMOption(const CMOption &) : CMOptionBase((char*)nullptr, nullptr) {}
- void operator= (const CMOption &) {}
};
#endif
@@ -572,10 +559,10 @@ public:
virtual void OnReset();
protected:
- HWND m_hwnd; // must be the first data item
+ HWND m_hwnd = nullptr; // must be the first data item
int m_idCtrl;
CDlgBase* m_parentWnd;
- bool m_bChanged, m_bSilent, m_bUseSystemColors;
+ bool m_bChanged = false, m_bSilent = false, m_bUseSystemColors = false;
public:
CCallback<CCtrlBase> OnChange;
diff --git a/src/mir_core/src/CCtrlBase.cpp b/src/mir_core/src/CCtrlBase.cpp
index 4761bd07d5..84b4998416 100644
--- a/src/mir_core/src/CCtrlBase.cpp
+++ b/src/mir_core/src/CCtrlBase.cpp
@@ -33,13 +33,9 @@ static LIST<CCtrlBase> arControls(10, CompareControls);
/////////////////////////////////////////////////////////////////////////////////////////
// CCtrlBase
-CCtrlBase::CCtrlBase(CDlgBase *wnd, int idCtrl)
- : m_parentWnd(wnd),
- m_idCtrl(idCtrl),
- m_hwnd(nullptr),
- m_bChanged(false),
- m_bSilent(false),
- m_bUseSystemColors(false)
+CCtrlBase::CCtrlBase(CDlgBase *wnd, int idCtrl) :
+ m_parentWnd(wnd),
+ m_idCtrl(idCtrl)
{
if (wnd)
wnd->AddControl(this);