Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetEditWnd()関数のNULLチェック削除 #2008

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions sakura_core/window/CEditWnd.cpp
Original file line number Diff line number Diff line change
@@ -49,7 +49,6 @@
#include "_main/CCommandLine.h" /// 2003/1/26 aroka
#include "_main/CAppMode.h"
#include "_os/CDropTarget.h"
#include "basis/CErrorInfo.h"
#include "dlg/CDlgAbout.h"
#include "dlg/CDlgPrintSetting.h"
#include "env/CShareData.h"
@@ -179,25 +178,6 @@ static void ShowCodeBox( HWND hWnd, CEditDoc* pcEditDoc )
}
}

/*!
* 編集ウインドウのインスタンスを取得します。
*
* 編集ウインドウの生存期間ははエディタプロセスと同じなので、
* ほとんどの場合、このグローバル関数を使ってアクセスできます。
*/
CEditWnd& GetEditWnd( void )
{
auto pcEditWnd = CEditWnd::getInstance();
if( !pcEditWnd )
{
::_com_raise_error(E_FAIL, MakeMsgError(L"Any CEditWnd has been instantiated."));
}
return *pcEditWnd;
}

// /* メッセージループ */
// DWORD MessageLoop_Thread( DWORD pCEditWndObject );

LRESULT CALLBACK CEditWndProc(
HWND hwnd, // handle of window
UINT uMsg, // message identifier
11 changes: 10 additions & 1 deletion sakura_core/window/CEditWnd.h
Original file line number Diff line number Diff line change
@@ -424,6 +424,15 @@ class CEditWnd
ESelectCountMode m_nSelectCountMode; // 選択文字カウント方法
};

CEditWnd& GetEditWnd( void );
/*!
* 編集ウインドウのインスタンスを取得します。
*
* 編集ウインドウの生存期間ははエディタプロセスと同じなので、
* ほとんどの場合、このグローバル関数を使ってアクセスできます。
*/
inline CEditWnd& GetEditWnd( void )
{
return *CEditWnd::getInstance();
}

#endif /* SAKURA_CEDITWND_6C771A35_3CC8_4932_BF15_823C40487A9F_H_ */