diff --git a/sakura_core/CGrepEnumFileBase.h b/sakura_core/CGrepEnumFileBase.h index 7a25ef44a7..294a4d710e 100644 --- a/sakura_core/CGrepEnumFileBase.h +++ b/sakura_core/CGrepEnumFileBase.h @@ -60,10 +60,14 @@ class CGrepEnumFileBase { private: VPGrepEnumItem m_vpItems; -public: - CGrepEnumFileBase(){ - } + using Me = CGrepEnumFileBase; +public: + CGrepEnumFileBase() noexcept = default; + CGrepEnumFileBase(const Me&) = delete; + Me& operator = (const Me&) = delete; + CGrepEnumFileBase(Me&&) noexcept = delete; + Me& operator = (Me&&) noexcept = delete; virtual ~CGrepEnumFileBase(){ ClearItems(); } @@ -180,4 +184,5 @@ class CGrepEnumFileBase { return found; } }; + #endif /* SAKURA_CGREPENUMFILEBASE_6B85547E_13E4_4183_AE06_B4D6395ABC88_H_ */ diff --git a/sakura_core/CGrepEnumKeys.h b/sakura_core/CGrepEnumKeys.h index 5eb1e1a96b..902cf4d18d 100644 --- a/sakura_core/CGrepEnumKeys.h +++ b/sakura_core/CGrepEnumKeys.h @@ -45,6 +45,9 @@ typedef std::vector< LPCWSTR > VGrepEnumKeys; class CGrepEnumKeys { + + using Me = CGrepEnumKeys; + public: VGrepEnumKeys m_vecSearchFileKeys; VGrepEnumKeys m_vecSearchFolderKeys; @@ -56,9 +59,11 @@ class CGrepEnumKeys { VGrepEnumKeys m_vecExceptAbsFolderKeys; public: - CGrepEnumKeys(){ - } - + CGrepEnumKeys() noexcept = default; + CGrepEnumKeys(const Me&) = delete; + Me& operator = (const Me&) = delete; + CGrepEnumKeys(Me&&) noexcept = delete; + Me& operator = (Me&&) noexcept = delete; ~CGrepEnumKeys(){ ClearItems(); } diff --git a/sakura_core/CKeyWordSetMgr.cpp b/sakura_core/CKeyWordSetMgr.cpp index 1370f15e9f..fd1156c62b 100644 --- a/sakura_core/CKeyWordSetMgr.cpp +++ b/sakura_core/CKeyWordSetMgr.cpp @@ -62,12 +62,6 @@ CKeyWordSetMgr::CKeyWordSetMgr( void ) return; } -CKeyWordSetMgr::~CKeyWordSetMgr( void) -{ - m_nKeyWordSetNum = 0; - return; -} - /*! @brief 全キーワードセットの削除と初期化 @@ -87,27 +81,6 @@ void CKeyWordSetMgr::ResetAllKeyWordSet( void ) } } -const CKeyWordSetMgr& CKeyWordSetMgr::operator=( CKeyWordSetMgr& cKeyWordSetMgr ) -{ -// int nDataLen; -// char* pData; -// int i; - if( this == &cKeyWordSetMgr ){ - return *this; - } - m_nCurrentKeyWordSetIdx = cKeyWordSetMgr.m_nCurrentKeyWordSetIdx; - m_nKeyWordSetNum = cKeyWordSetMgr.m_nKeyWordSetNum; - //配列まるごとコピー - memcpy_raw( m_szSetNameArr , cKeyWordSetMgr.m_szSetNameArr , sizeof( m_szSetNameArr ) ); - memcpy_raw( m_bKEYWORDCASEArr, cKeyWordSetMgr.m_bKEYWORDCASEArr, sizeof( m_bKEYWORDCASEArr ) ); - memcpy_raw( m_nStartIdx , cKeyWordSetMgr.m_nStartIdx , sizeof( m_nStartIdx ) );// 2004.07.29 Moca - memcpy_raw( m_nKeyWordNumArr , cKeyWordSetMgr.m_nKeyWordNumArr , sizeof( m_nKeyWordNumArr ) ); - memcpy_raw( m_szKeyWordArr , cKeyWordSetMgr.m_szKeyWordArr , sizeof( m_szKeyWordArr ) ); - memcpy_raw( m_IsSorted , cKeyWordSetMgr.m_IsSorted , sizeof( m_IsSorted ) ); //MIK 2000.12.01 binary search - memcpy_raw( m_nKeyWordMaxLenArr, cKeyWordSetMgr.m_nKeyWordMaxLenArr, sizeof( m_nKeyWordMaxLenArr ) ); //2014.05.04 Moca - return *this; -} - /*! @brief キーワードセットの追加 @date 2005.01.26 Moca 新規作成 diff --git a/sakura_core/CKeyWordSetMgr.h b/sakura_core/CKeyWordSetMgr.h index fa11367300..130b667462 100644 --- a/sakura_core/CKeyWordSetMgr.h +++ b/sakura_core/CKeyWordSetMgr.h @@ -74,8 +74,7 @@ class CKeyWordSetMgr || Constructors */ CKeyWordSetMgr(); - ~CKeyWordSetMgr(); - + /// @name キーワードセット操作 bool AddKeyWordSet( //!< セットの追加 const wchar_t* pszSetName, //!< [in] セット名 @@ -124,10 +123,6 @@ class CKeyWordSetMgr void ResetAllKeyWordSet( void ); // 全キーワードセットの削除と初期化 // To Here 2004.07.29 Moca - /* - || 演算子 - */ - const CKeyWordSetMgr& operator=( CKeyWordSetMgr& ); /* || Attributes & Operations */ diff --git a/sakura_core/COpeBlk.h b/sakura_core/COpeBlk.h index d817bc65a7..fcdfd26433 100644 --- a/sakura_core/COpeBlk.h +++ b/sakura_core/COpeBlk.h @@ -30,9 +30,16 @@ class COpeBlk; COpe を複数束ねるためのもの。Undo, Redoはこのブロック単位で行われる。 */ class COpeBlk { + + using Me = COpeBlk; + public: //コンストラクタ・デストラクタ COpeBlk(); + COpeBlk(const Me&) = delete; + Me& operator = (const Me&) = delete; + COpeBlk(Me&&) noexcept = delete; + Me& operator = (Me&&) noexcept = delete; ~COpeBlk(); //インターフェース diff --git a/sakura_core/COpeBuf.h b/sakura_core/COpeBuf.h index 510bc9b25f..9cebf2da43 100644 --- a/sakura_core/COpeBuf.h +++ b/sakura_core/COpeBuf.h @@ -29,9 +29,16 @@ class COpeBlk;/// 2002/2/10 aroka @brief アンドゥ・リドゥバッファ */ class COpeBuf { + + using Me = COpeBuf; + public: //コンストラクタ・デストラクタ COpeBuf(); + COpeBuf(const Me&) = delete; + Me& operator = (const Me&) = delete; + COpeBuf(Me&&) noexcept = delete; + Me& operator = (Me&&) noexcept = delete; ~COpeBuf(); //状態 diff --git a/sakura_core/CSelectLang.h b/sakura_core/CSelectLang.h index 538f324fb8..7efd60a9f9 100644 --- a/sakura_core/CSelectLang.h +++ b/sakura_core/CSelectLang.h @@ -23,6 +23,9 @@ class CSelectLang { + + using Me = CSelectLang; + public: // メッセージリソース用構造体 struct SSelLangInfo { @@ -44,7 +47,11 @@ class CSelectLang /* || Constructors */ - CSelectLang(){} + CSelectLang() noexcept = default; + CSelectLang(const Me&) = delete; + Me& operator = (const Me&) = delete; + CSelectLang(Me&&) noexcept = delete; + Me& operator = (Me&&) noexcept = delete; ~CSelectLang(); /* diff --git a/sakura_core/charset/CESI.h b/sakura_core/charset/CESI.h index c9afb042b4..76279506d1 100644 --- a/sakura_core/charset/CESI.h +++ b/sakura_core/charset/CESI.h @@ -85,8 +85,15 @@ enum EBOMType { //*/ class CESI { + + using Me = CESI; + public: + CESI(const Me&) = delete; + Me& operator = (const Me&) = delete; + CESI(Me&&) noexcept = delete; + Me& operator = (Me&&) noexcept = delete; virtual ~CESI() { ; } explicit CESI( const SEncodingConfig& ref ) : m_pEncodingConfig(&ref) { m_dwStatus = ESI_NOINFORMATION; diff --git a/sakura_core/dlg/CDialog.h b/sakura_core/dlg/CDialog.h index 51b2c6d4aa..fee57884b3 100644 --- a/sakura_core/dlg/CDialog.h +++ b/sakura_core/dlg/CDialog.h @@ -62,13 +62,19 @@ struct SAnchorList @date 2002.2.17 YAZAKI CShareDataのインスタンスは、CProcessにひとつあるのみ。 */ -class CDialog -{ +class CDialog{ + + using Me = CDialog; + public: /* || Constructors */ CDialog( bool bSizable = false, bool bCheckShareData = true ); + CDialog(const Me&) = delete; + Me& operator = (const Me&) = delete; + CDialog(Me&&) noexcept = delete; + Me& operator = (Me&&) noexcept = delete; virtual ~CDialog(); /* || Attributes & Operations diff --git a/sakura_core/extmodule/CDllHandler.h b/sakura_core/extmodule/CDllHandler.h index 63d36e5892..04f37ee075 100644 --- a/sakura_core/extmodule/CDllHandler.h +++ b/sakura_core/extmodule/CDllHandler.h @@ -87,6 +87,9 @@ enum EDllResult{ @date 2008.05.10 kobake 整理。派生クラスは、~Impをオーバーロードすれば良いという方式です。 */ class CDllImp{ + + using Me = CDllImp; + // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // // 型 // // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // @@ -107,6 +110,10 @@ class CDllImp{ public: //コンストラクタ・デストラクタ CDllImp(); + CDllImp(const Me&) = delete; + Me& operator = (const Me&) = delete; + CDllImp(Me&&) noexcept = delete; + Me& operator = (Me&&) noexcept = delete; virtual ~CDllImp(); // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // diff --git a/sakura_core/extmodule/CIcu4cI18n.cpp b/sakura_core/extmodule/CIcu4cI18n.cpp index 301716e9a4..1527ca4891 100644 --- a/sakura_core/extmodule/CIcu4cI18n.cpp +++ b/sakura_core/extmodule/CIcu4cI18n.cpp @@ -33,10 +33,6 @@ CIcu4cI18n::CIcu4cI18n() noexcept { } -CIcu4cI18n::~CIcu4cI18n() noexcept -{ -} - /*! * @brief DLLの名前を返す */ diff --git a/sakura_core/extmodule/CIcu4cI18n.h b/sakura_core/extmodule/CIcu4cI18n.h index 3b085f4b1a..f9c09fbdba 100644 --- a/sakura_core/extmodule/CIcu4cI18n.h +++ b/sakura_core/extmodule/CIcu4cI18n.h @@ -57,7 +57,6 @@ class CIcu4cI18n final : public CDllImp public: CIcu4cI18n() noexcept; - virtual ~CIcu4cI18n() noexcept; protected: // CDllImpインタフェース diff --git a/sakura_core/window/CWnd.h b/sakura_core/window/CWnd.h index bfd011dfdf..43805a633f 100644 --- a/sakura_core/window/CWnd.h +++ b/sakura_core/window/CWnd.h @@ -37,12 +37,20 @@ */ class CWnd { + + using Me = CWnd; + protected: friend LRESULT CALLBACK CWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); public: /* Constructors */ CWnd(const WCHAR* pszInheritanceAppend = L""); + CWnd(const Me&) = delete; + Me& operator = (const Me&) = delete; + CWnd(Me&&) noexcept = delete; + Me& operator = (Me&&) noexcept = delete; virtual ~CWnd(); + /* || Attributes & Operations */