• R/O
  • HTTP
  • SSH
  • HTTPS

lychee: コミット

tpi


コミットメタ情報

リビジョンb4a642b33db5df1bb2661b53144508b78390d527 (tree)
日時2014-01-26 19:03:31
作者sirakaba <sirakaba@9df9...>
コミッターsirakaba

ログメッセージ

C++11のauto, nullptrを導入。

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@653 9df91469-1e22-0410-86e7-ea8537beb833

変更サマリ

差分

--- a/src/common/Makefile.default
+++ b/src/common/Makefile.default
@@ -3,7 +3,7 @@
33
44 # Define compilers.
55 CC = clang++
6-CPPFLAGS = -c -O3 -Wall -Wextra -fno-exceptions -fno-rtti -fPIC `wx-config --cxxflags` -std=c++11
6+CPPFLAGS = -c -O3 -std=c++11 -Wall -Wextra -fno-exceptions -fno-rtti -fPIC `wx-config --cxxflags`
77 LDFLAGS = -s -flto
88
99 # Check the architecture.
@@ -25,7 +25,7 @@ clean:
2525 rm -f -r $(FULL_OBJS) $(FULL_EXE)
2626
2727 $(FULL_EXE): $(FULL_OBJS) $(IN_ADD)
28- $(CC) $(LDFLAGS) -o $(FULL_EXE) $(FULL_OBJS) `wx-config --libs`
28+ $(CC) $(LDFLAGS) -o $(FULL_EXE) $(FULL_OBJS) `wx-config --libs core,xrc`
2929
3030 $(FULL_OBJ)/%.o: %.cpp
3131 $(CC) $(CPPFLAGS) -o $@ $<
--- a/src/common/handle/TPIHandle.cpp
+++ b/src/common/handle/TPIHandle.cpp
@@ -43,7 +43,7 @@
4343 // Class (TPIHandle)
4444 //******************************************************************************
4545
46-TPIHandle::TPIHandle(void) : nErrorCode(TPI_ERROR_SUCCESS), bHandleOnCommand(1), archive(NULL)
46+TPIHandle::TPIHandle(void) : nErrorCode(TPI_ERROR_SUCCESS), bHandleOnCommand(1), archive(nullptr)
4747 {
4848 }
4949
@@ -79,10 +79,10 @@ bool TPIHandle::FreeLibrary(void)
7979 }
8080
8181 GetAPIAddress("FreePlugin", p);
82- this->nErrorCode = ((int (__stdcall *)(void *)) p)(NULL);
82+ this->nErrorCode = ((int (__stdcall *)(void *)) p)(nullptr);
8383
8484 this->lib.Unload();
85- this->archive = NULL;
85+ this->archive = nullptr;
8686 return this->nErrorCode == TPI_ERROR_SUCCESS;
8787 }
8888
@@ -122,7 +122,7 @@ bool TPIHandle::GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst)
122122 _fiInfo->szTPIName.Empty();
123123 _fiInfo->eSupportedCommand = 0;
124124 _fiInfo->nTypeId = 0;
125- _fiInfo->pCustomInfo = NULL;
125+ _fiInfo->pCustomInfo = nullptr;
126126
127127 GetAPIAddress("GetFormatInformation", p);
128128 this->nErrorCode = ((int (__stdcall *)(TPI_FORMATINFO *, bool)) p)(_fiInfo, _bFirst);
@@ -139,14 +139,14 @@ bool TPIHandle::OpenArchive(const wxString & _szArcName, wxULongLong_t * _llFile
139139
140140 bool TPIHandle::CloseArchive(void)
141141 {
142- if (this->archive == NULL)
142+ if (this->archive == nullptr)
143143 {
144144 return false;
145145 }
146146 this->nErrorCode = TPI_ERROR_SUCCESS;
147147 GetAPIAddress("CloseArchive", p);
148148 this->nErrorCode = ((int (__stdcall *)(void *)) p)(this->archive);
149- this->archive = NULL;
149+ this->archive = nullptr;
150150 return this->nErrorCode == TPI_ERROR_SUCCESS;
151151 }
152152
@@ -177,7 +177,7 @@ bool TPIHandle::GetFileInformation(TPI_FILEINFO * _fiInfo, bool _bFirst)
177177 _fiInfo->szUser.Empty();
178178 _fiInfo->szGroup.Empty();
179179 _fiInfo->nFileId = 0;
180- _fiInfo->pCustomInfo = NULL;
180+ _fiInfo->pCustomInfo = nullptr;
181181
182182 GetAPIAddress("GetFileInformation", p);
183183 this->nErrorCode = ((int (__stdcall *)(void *, TPI_FILEINFO *, bool)) p)(this->archive, _fiInfo, _bFirst);
@@ -213,7 +213,7 @@ bool TPIHandle::GetArchiveInformation(TPI_ARCHIVEINFO * _aiInfo)
213213 _aiInfo->fnArchive.Clear();
214214 _aiInfo->szComment.Empty();
215215 _aiInfo->wCompressRatio = 0;
216- _aiInfo->pCustomInfo = NULL;
216+ _aiInfo->pCustomInfo = nullptr;
217217 // FORMATINFO
218218 _aiInfo->fiInfo.fComment = false;
219219 _aiInfo->fiInfo.fCompressHeader = false;
@@ -233,7 +233,7 @@ bool TPIHandle::GetArchiveInformation(TPI_ARCHIVEINFO * _aiInfo)
233233 _aiInfo->fiInfo.szTPIName.Empty();
234234 _aiInfo->fiInfo.eSupportedCommand = 0;
235235 _aiInfo->fiInfo.nTypeId = 0;
236- _aiInfo->fiInfo.pCustomInfo = NULL;
236+ _aiInfo->fiInfo.pCustomInfo = nullptr;
237237
238238 GetAPIAddress("GetArchiveInformation", p);
239239 this->nErrorCode = ((int (__stdcall *)(void *, TPI_ARCHIVEINFO *)) p)(this->archive, _aiInfo);
--- a/src/common/handle/TPIHandle.h
+++ b/src/common/handle/TPIHandle.h
@@ -34,13 +34,13 @@ class TPIHandle
3434 public:
3535 TPIHandle(void);
3636 ~TPIHandle(void);
37- bool InitLibrary(const wxString & _szLibName, const wxString & _szArcName, TPI_PROC _prProc = NULL, wxULongLong_t _llTypeId = 0);
37+ bool InitLibrary(const wxString & _szLibName, const wxString & _szArcName, TPI_PROC _prProc = nullptr, wxULongLong_t _llTypeId = 0);
3838 bool FreeLibrary(void);
3939
4040 bool GetPluginInformation(unsigned int _uInfoId, wxULongLong_t _llSubOption, void * _pPtr);
4141 bool GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst = false);
4242
43- bool OpenArchive(const wxString & _szArcName, wxULongLong_t * _llFileCount = NULL);
43+ bool OpenArchive(const wxString & _szArcName, wxULongLong_t * _llFileCount = nullptr);
4444 bool CloseArchive(void);
4545 bool GetFileInformation(TPI_FILEINFO * _fiInfo, bool _bFirst = false);
4646 bool GetArchiveInformation(TPI_ARCHIVEINFO * _aiInfo);
--- a/src/common/header/plugin.h
+++ b/src/common/header/plugin.h
@@ -427,7 +427,7 @@ int __stdcall GetFormatInformation
427427 );
428428
429429 /** プラグインを使用するための初期化を行う。
430- * @param _szArcName これから操作する対象となる書庫名。不明な場合はNULLを指定。
430+ * @param _szArcName これから操作する対象となる書庫名。不明な場合はwxEmptyStringを指定。
431431 * @param _prProc コールバック関数へのポインタ。
432432 * @param _nTypeId 書庫を作成する場合には、その格納形式IDを指定。それ以外の場合は0。
433433 * @return エラーコード。
@@ -440,25 +440,25 @@ int __stdcall LoadPlugin
440440 );
441441
442442 /** プラグインを解放する。
443- * @param _pReserved 予約済み。現状では常にNULL。
443+ * @param _pReserved 予約済み。現状では常にnullptr。
444444 * @return エラーコード。
445445 */
446446 int __stdcall FreePlugin
447447 (
448- void * _pReserved = NULL
448+ void * _pReserved = nullptr
449449 );
450450
451451 /** 書庫のハンドルを取得する。
452452 * @param _szArcName 操作する対象となる書庫名。
453453 * @param _hArchive 取得したハンドルを格納するためのポインタ。
454- * @param _nFileCount 書庫に格納されているファイル数を格納するためのポインタ。情報が不要ならばNULLを指定。
454+ * @param _nFileCount 書庫に格納されているファイル数を格納するためのポインタ。情報が不要ならばnullptrを指定。
455455 * @return エラーコード。
456456 */
457457 int __stdcall OpenArchive
458458 (
459459 const wxString & _szArcName,
460460 void * * _hArchive,
461- wxULongLong_t * _nFileCount = NULL
461+ wxULongLong_t * _nFileCount = nullptr
462462 );
463463
464464 /** 書庫のハンドルを解放する。
@@ -497,7 +497,7 @@ int __stdcall GetArchiveInformation
497497 /** 各種の書庫操作を行う。
498498 * @param _eCommand 書庫操作の種類を表すコマンドコード。
499499 * @param _swInfo 書庫操作に必要な情報を格納した構造体へのポインタ。
500- * @param _hArchive 操作する対象となる書庫ハンドル。書庫を作成するときはNULL。
500+ * @param _hArchive 操作する対象となる書庫ハンドル。書庫を作成するときはnullptr。
501501 * @param _szFiles 対象ファイル名のリスト。
502502 * @return エラーコード。
503503 * @sa c_command
--- a/src/common/library/library.h
+++ b/src/common/library/library.h
@@ -30,7 +30,7 @@
3030 // Functions
3131 //******************************************************************************
3232
33-wxString MakeCommandLineSend(const wxString & szCommandLine, TPI_SWITCHES * swInfo = NULL, const wxArrayString & asFiles = wxArrayString(), const wxString & szResponceFileName = wxEmptyString);
33+wxString MakeCommandLineSend(const wxString & szCommandLine, TPI_SWITCHES * swInfo = nullptr, const wxArrayString & asFiles = wxArrayString(), const wxString & szResponceFileName = wxEmptyString);
3434 wxString MakeResponceFile(const wxArrayString & asFiles, bool bQuote, bool bUnicode = false);
3535 wxString MB2String(const char * sz);
3636 wxString UTF82String(const char * sz);
@@ -40,7 +40,7 @@ inline void RemoveCwdFromSearchPath(void)
4040 {
4141 #ifdef __WINDOWS__
4242 static void * p = (void *) ::GetProcAddress(::GetModuleHandleW(L"kernel32.dll"), "SetDllDirectoryW");
43- if (p != NULL)
43+ if (p != nullptr)
4444 {
4545 ((int (__stdcall *)(const wchar_t *)) p)(L"");
4646 }
--- a/src/common/library/xmldoc.cpp
+++ b/src/common/library/xmldoc.cpp
@@ -46,16 +46,16 @@ wxXmlNode * myGetFirstLib(wxXmlDocument * xmlDoc, int nLibIndex)
4646 {
4747 if (! xmlDoc->IsOk())
4848 {
49- return NULL;
49+ return nullptr;
5050 }
5151 wxXmlNode * n = xmlDoc->GetRoot()->GetChildren();
52- return (n == NULL || myIsLib(n)) ? (nLibIndex <= 0 ? n : myGetNextLib(n, nLibIndex - 1)) : myGetNextLib(n, nLibIndex);
52+ return (n == nullptr || myIsLib(n)) ? (nLibIndex <= 0 ? n : myGetNextLib(n, nLibIndex - 1)) : myGetNextLib(n, nLibIndex);
5353 }
5454
5555 wxXmlNode * myGetNextLib(wxXmlNode * n, int nLibIndex)
5656 {
5757 n = n->GetNext();
58- return (n == NULL || myIsLib(n)) ? (nLibIndex <= 0 ? n : myGetNextLib(n, nLibIndex - 1)) : myGetNextLib(n, nLibIndex);
58+ return (n == nullptr || myIsLib(n)) ? (nLibIndex <= 0 ? n : myGetNextLib(n, nLibIndex - 1)) : myGetNextLib(n, nLibIndex);
5959 }
6060
6161 wxULongLong_t myGetAttributeInt(wxXmlNode * n, const wxString & szValue, wxULongLong_t nDefaultValue, int nBase)
--- a/src/lychee/cls_listctrl.cpp
+++ b/src/lychee/cls_listctrl.cpp
@@ -103,7 +103,7 @@ wxListItemAttr * myListCtrl::OnGetItemAttr(long i) const
103103 TPI_FILEINFO * fi = (TPI_FILEINFO *) this->apShowFile[i];
104104 return
105105 fi->eDanger ? (wxListItemAttr *) & this->atDangerItem :
106- fi->dwAttribute & TPI_ATTRIBUTE_ENCRYPTED ? (wxListItemAttr *) & this->atEncryptedItem : NULL;
106+ fi->dwAttribute & TPI_ATTRIBUTE_ENCRYPTED ? (wxListItemAttr *) & this->atEncryptedItem : nullptr;
107107 }
108108
109109 void myListCtrl::OnColClick(wxListEvent& e)
--- a/src/lychee/dlg_make.cpp
+++ b/src/lychee/dlg_make.cpp
@@ -424,7 +424,7 @@ void MakeDialog::OnTabChanged(wxNotebookEvent& e)
424424 }
425425 else
426426 {
427- this->lcFiles->apItem.Add(fn.FileExists() || ::wxDirExists(fn.GetFullPath()) ? & this->lcFiles->atExistItem : NULL);
427+ this->lcFiles->apItem.Add(fn.FileExists() || ::wxDirExists(fn.GetFullPath()) ? & this->lcFiles->atExistItem : nullptr);
428428 }
429429 this->lcFiles->asOutput.Add(fn.GetFullPath());
430430 }
@@ -447,7 +447,7 @@ void MakeDialog::OnTabChanged(wxNotebookEvent& e)
447447 }
448448 else
449449 {
450- this->lcFiles->apItem.Add(NULL);
450+ this->lcFiles->apItem.Add(nullptr);
451451 }
452452 }
453453 break;
--- a/src/lychee/dlg_process.cpp
+++ b/src/lychee/dlg_process.cpp
@@ -25,7 +25,7 @@
2525 #include "frm_main.h"
2626 #include "functions.h"
2727
28-ProcessDialog * g_procDlg = NULL;
28+ProcessDialog * g_procDlg = nullptr;
2929
3030 //******************************************************************************
3131 // ProcessDialog
@@ -59,14 +59,14 @@ ProcessDialog::~ProcessDialog()
5959 }
6060
6161 #ifdef __WINDOWS__
62- if (this->tlTaskbar != NULL)
62+ if (this->tlTaskbar != nullptr)
6363 {
6464 this->tlTaskbar->SetProgressState(this->hTBWnd, TBPF_NOPROGRESS);
6565 this->tlTaskbar->Release();
6666 }
6767 #endif
6868 ((MainFrame *) this->hParent)->gFrame->Show(false);
69- g_procDlg = NULL;
69+ g_procDlg = nullptr;
7070 }
7171
7272 //******************************************************************************
@@ -126,8 +126,8 @@ void ProcessDialog::OnInit(wxInitDialogEvent &)
126126 // タスクバー。
127127 this->hTBWnd = frm_main->GetHandle();
128128
129- ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (void **) & this->tlTaskbar);
130- if (this->tlTaskbar != NULL)
129+ ::CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (void **) & this->tlTaskbar);
130+ if (this->tlTaskbar != nullptr)
131131 {
132132 this->tlTaskbar->HrInit();
133133 }
@@ -151,7 +151,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure)
151151 }
152152
153153 TPI_PROCESSINFO * piInfo = (TPI_PROCESSINFO *) _pStructure;
154- if (piInfo == NULL)
154+ if (piInfo == nullptr)
155155 {
156156 return TPI_CALLBACK_CONTINUE;
157157 }
@@ -199,7 +199,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure)
199199 ((MainFrame *) this->hParent)->gFrame->SetValue(s_nProcess);
200200 }
201201 #ifdef __WINDOWS__
202- if (this->tlTaskbar != NULL)
202+ if (this->tlTaskbar != nullptr)
203203 {
204204 this->tlTaskbar->SetProgressValue(this->hTBWnd, s_nProcess, s_nFileCount);
205205 }
@@ -242,7 +242,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure)
242242 }
243243 ((MainFrame *) this->hParent)->gFrame->SetValue(piInfo->nProcessedSize);
244244 #ifdef __WINDOWS__
245- if (this->tlTaskbar != NULL)
245+ if (this->tlTaskbar != nullptr)
246246 {
247247 this->tlTaskbar->SetProgressValue(this->hTBWnd, piInfo->nProcessedSize, s_nFileCount);
248248 }
@@ -254,7 +254,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure)
254254 case TPI_MESSAGE_ASK:
255255 {
256256 #ifdef __WINDOWS__
257- if (this->tlTaskbar != NULL)
257+ if (this->tlTaskbar != nullptr)
258258 {
259259 this->tlTaskbar->SetProgressState(this->hTBWnd, TBPF_PAUSED);
260260 }
@@ -343,7 +343,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure)
343343 return TPI_CALLBACK_UNSUPPORTED;
344344 }
345345 #ifdef __WINDOWS__
346- if (this->tlTaskbar != NULL)
346+ if (this->tlTaskbar != nullptr)
347347 {
348348 this->tlTaskbar->SetProgressState(this->hTBWnd, TBPF_NORMAL);
349349 }
@@ -445,5 +445,5 @@ void OverwriteDialog::OnBtnBrowse(wxCommandEvent&)
445445
446446 int __stdcall TPICallbackProc(unsigned int _uMsg, void * _pStructure)
447447 {
448- return g_procDlg == NULL ? TPI_CALLBACK_CONTINUE : g_procDlg->CallbackProc(_uMsg, _pStructure);
448+ return g_procDlg == nullptr ? TPI_CALLBACK_CONTINUE : g_procDlg->CallbackProc(_uMsg, _pStructure);
449449 }
--- a/src/lychee/frm_main.cpp
+++ b/src/lychee/frm_main.cpp
@@ -45,7 +45,7 @@ bool g_fSortAscend;
4545 // MainFrame
4646 //******************************************************************************
4747
48-MainFrame::MainFrame(): wxFrame(), gFrame(NULL)
48+MainFrame::MainFrame(): wxFrame(), gFrame(nullptr)
4949 {
5050 }
5151
@@ -210,7 +210,7 @@ void MainFrame::OnInit(wxInitDialogEvent&)
210210
211211 void MainFrame::OnClose(wxCloseEvent& e)
212212 {
213- if (e.CanVeto() && g_procDlg != NULL)
213+ if (e.CanVeto() && g_procDlg != nullptr)
214214 {
215215 g_procDlg->OnClose(e);
216216 e.Veto();
@@ -224,7 +224,7 @@ void MainFrame::OnClose(wxCloseEvent& e)
224224 void MainFrame::OnSize(wxSizeEvent& e)
225225 {
226226 // プログレスバーの位置を変更。
227- if (this->gFrame != NULL)
227+ if (this->gFrame != nullptr)
228228 {
229229 this->gFrame->SetPosition(wxPoint(this->statusbar->GetSize().GetWidth() - 230, 10));
230230 }
@@ -241,11 +241,11 @@ void MainFrame::OnExit(wxCommandEvent&)
241241 void MainFrame::OnArcCreate(wxCommandEvent& e)
242242 {
243243 TPI_SWITCHES swInfo;
244- swInfo.pCustomSwitches = NULL;
244+ swInfo.pCustomSwitches = nullptr;
245245
246246 // 作成ダイアログを設定。
247247 MakeDialog mkDlg(this, TPI_COMMAND_CREATE);
248- if (e.GetClientData() == NULL)
248+ if (e.GetClientData() == nullptr)
249249 {
250250 if (::wxGetKeyState(WXK_SHIFT))
251251 {
@@ -686,9 +686,9 @@ void MainFrame::OnArcAdd(wxCommandEvent& e)
686686 MakeDialog mkDlg(this, TPI_COMMAND_ADD);
687687
688688 TPI_SWITCHES swInfo;
689- swInfo.pCustomSwitches = NULL;
689+ swInfo.pCustomSwitches = nullptr;
690690
691- if (e.GetClientData() == NULL)
691+ if (e.GetClientData() == nullptr)
692692 {
693693 if (::wxGetKeyState(WXK_SHIFT))
694694 {
@@ -802,7 +802,7 @@ void MainFrame::OnArcExtract(wxCommandEvent& e)
802802 {
803803 TPI_SWITCHES swInfo;
804804 swInfo.szArcName = this->fnArchive.GetFullPath();
805- swInfo.pCustomSwitches = NULL;
805+ swInfo.pCustomSwitches = nullptr;
806806 swInfo.szPassword = this->szPassword;
807807
808808 // モード取得。通常は0, 実行なら1, ファイルDnDなら2、ディレクトリDnDなら3、クリップボードなら4、コンテキストメニューからなら8。
@@ -812,7 +812,7 @@ void MainFrame::OnArcExtract(wxCommandEvent& e)
812812 nMode = 0;
813813 }
814814 // 実行時のみ使用。
815- wxFileType * ftFile = NULL;
815+ wxFileType * ftFile = nullptr;
816816
817817 // 展開ダイアログを作成。DnDまたは実行時は表示しない。
818818 MakeDialog mkDlg(this, TPI_COMMAND_EXTRACT);
@@ -906,8 +906,8 @@ void MainFrame::OnArcExtract(wxCommandEvent& e)
906906
907907 // コマンドを実行。
908908 wxString szTempFile = swInfo.fnDestinationDirectory.GetPathWithSep() + wxFileName(mkDlg.files[0], wxPATH_DOS).GetFullName();
909- bool fSuccess = tpi.nErrorCode == TPI_ERROR_SUCCESS && ftFile != NULL;
910- myProcess * pCallback = new myProcess(szTempFile, swInfo.fnDestinationDirectory.GetPath());
909+ bool fSuccess = tpi.nErrorCode == TPI_ERROR_SUCCESS && ftFile != nullptr;
910+ auto pCallback = new myProcess(szTempFile, swInfo.fnDestinationDirectory.GetPath());
911911 if (fSuccess)
912912 {
913913 #ifdef __LINUX__
@@ -926,7 +926,7 @@ void MainFrame::OnArcExtract(wxCommandEvent& e)
926926 {
927927 // 展開対象を決定。
928928 wxArrayString asFiles;
929- myFileDataObject * objFile = new myFileDataObject();
929+ auto objFile = new myFileDataObject();
930930 objFile->szTempDir = nMode == 3 ? swInfo.fnDestinationDirectory.GetPath() : swInfo.fnDestinationDirectory.GetFullPath();
931931 // for (auto s : mkDlg.files)
932932 for (size_t n = 0; n < mkDlg.files.GetCount(); n++)
@@ -955,7 +955,7 @@ void MainFrame::OnArcExtract(wxCommandEvent& e)
955955 else
956956 {
957957 // 自身にドロップされると煩雑なので、一時的にドロップを受け付けないようにしておく。
958- this->SetDropTarget(NULL);
958+ this->SetDropTarget(nullptr);
959959
960960 // DnD開始。
961961 wxDropSource dropSource(* objFile, this);
--- a/src/lychee/lychee.cpp
+++ b/src/lychee/lychee.cpp
@@ -45,14 +45,14 @@ bool Lychee::OnInit()
4545 this->lc.AddCatalogLookupPathPrefix(L_DIR_S_LOC);
4646 this->lc.AddCatalog(wxT("lychee"));
4747
48- MainFrame * frm_main = new MainFrame();
48+ auto frm_main = new MainFrame();
4949 if (! ::wxXmlResource::Get()->Load(L_DIR_S_XRC wxT("frm_main.xrc")))
5050 {
5151 wxLogError(_("Unable to find XRC!"));
5252 return false;
5353 }
5454
55- ::wxXmlResource::Get()->LoadFrame(frm_main, NULL, wxT("frame_main"));
55+ ::wxXmlResource::Get()->LoadFrame(frm_main, nullptr, wxT("frame_main"));
5656 ::wxXmlResource::Get()->Unload(L_DIR_S_XRC wxT("frm_main.xrc"));
5757 frm_main->InitDialog();
5858
@@ -65,7 +65,7 @@ bool Lychee::OnInit()
6565 }
6666
6767 // 書庫を開く。
68- wxCommandEvent * e = new wxCommandEvent(wxEVT_COMMAND_MENU_SELECTED, XRCID("Arc_Open"));
68+ auto e = new wxCommandEvent(wxEVT_COMMAND_MENU_SELECTED, XRCID("Arc_Open"));
6969 e->SetInt(1);
7070 frm_main->fnArchive = wxFileName(wxString(this->argv[1]));
7171 frm_main->fnArchive.Normalize(wxPATH_NORM_ALL, szCwd);
--- a/src/plugin/7zArc/7zArc.cpp
+++ b/src/plugin/7zArc/7zArc.cpp
@@ -205,7 +205,7 @@ STDMETHODIMP CArchiveOpenCallback::GetStream(const wchar_t * szName, IInStream *
205205 {
206206 return S_FALSE;
207207 }
208- * inStream = NULL;
208+ * inStream = nullptr;
209209 wxString szFileName = this->piInfo.fiInfo.fnFileName.GetPathWithSep() + szName;
210210 if (! this->fiInfo.Find(szFileName.c_str()) || fiInfo.IsDir())
211211 {
@@ -213,7 +213,7 @@ STDMETHODIMP CArchiveOpenCallback::GetStream(const wchar_t * szName, IInStream *
213213 return S_FALSE;
214214 }
215215
216- CInFileStream * inFile = new CInFileStream;
216+ auto inFile = new CInFileStream;
217217 CMyComPtr<IInStream> inStreamTemp = inFile;
218218 if (! inFile->Open(szFileName.c_str()))
219219 {
@@ -235,7 +235,7 @@ STDMETHODIMP CArchiveOpenCallback::CryptoGetTextPassword(BSTR * sz)
235235 this->piInfo.eMessage = TPI_MESSAGE_ASK;
236236 this->piInfo.eStatus = TPI_PARAM_PASSWORD;
237237 return
238- (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) == TPI_CALLBACK_CONTINUE) ? ::StringToBstr(this->piInfo.szParam.c_str(), sz) :
238+ (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) == TPI_CALLBACK_CONTINUE) ? ::StringToBstr(this->piInfo.szParam.c_str(), sz) :
239239 E_ABORT;
240240 }
241241
@@ -279,7 +279,7 @@ STDMETHODIMP CArchiveExtractCallback::SetCompleted(const wxULongLong_t * nProces
279279 {
280280 this->piInfo.eStatus = TPI_STATUS_INPROCESS;
281281 this->piInfo.nProcessedSize = * nProcessed - this->nCurrentPos;
282- if (g_prProc == NULL || this->piInfo.fiInfo.szStoredName.IsEmpty() || ! this->piInfo.fnDestination.IsOk() || g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) == TPI_CALLBACK_CONTINUE)
282+ if (g_prProc == nullptr || this->piInfo.fiInfo.szStoredName.IsEmpty() || ! this->piInfo.fnDestination.IsOk() || g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) == TPI_CALLBACK_CONTINUE)
283283 {
284284 return S_OK;
285285 }
@@ -301,7 +301,7 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(unsigned int nIndex, ISequential
301301 {
302302 this->piInfo.eMessage = TPI_MESSAGE_STATUS;
303303 this->piInfo.eStatus = TPI_STATUS_ENDPROCESS;
304- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
304+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
305305 {
306306 this->nErrorCode = TPI_ERROR_D_SKIPPED;
307307 return E_ABORT;
@@ -323,7 +323,7 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(unsigned int nIndex, ISequential
323323 }
324324
325325 this->piInfo.fnDestination = wxFileName(swInfo->fnDestinationDirectory.GetFullPath() + wxFileName::GetPathSeparator() + (swInfo->fStoreDirectoryPathes ? this->piInfo.fiInfo.fnFileName.GetPath() : (wxString) wxEmptyString), this->piInfo.fiInfo.fnFileName.GetFullName());
326- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
326+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
327327 {
328328 this->nErrorCode = TPI_ERROR_D_SKIPPED;
329329 return E_ABORT;
@@ -336,7 +336,7 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(unsigned int nIndex, ISequential
336336 // ファイルの基本情報を取得。
337337 this->piInfo.eMessage = TPI_MESSAGE_STATUS;
338338 this->piInfo.eStatus = TPI_STATUS_BEGINPROCESS;
339- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
339+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
340340 {
341341 this->nErrorCode = TPI_ERROR_D_SKIPPED;
342342 return E_ABORT;
@@ -390,7 +390,7 @@ STDMETHODIMP CArchiveExtractCallback::SetOperationResult(int nResult)
390390 }
391391
392392 // 時刻を記録。
393- if (_outFileStream != NULL)
393+ if (_outFileStream != nullptr)
394394 {
395395 FILETIME ftAccess, ftCreate, ftModify;
396396 NWindows::NTime::UnixTimeToFileTime(this->piInfo.fiInfo.tmAccess.GetTicks(), ftAccess);
@@ -421,7 +421,7 @@ STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR * szPassword)
421421 this->piInfo.eStatus = TPI_PARAM_PASSWORD;
422422 // 次のファイル名が取得できないので、とりあえず空にしておく。
423423 this->piInfo.fiInfo.fnFileName.Clear();
424- return (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) == TPI_CALLBACK_CONTINUE) ? ::StringToBstr(this->piInfo.szParam.c_str(), szPassword) : E_ABORT;
424+ return (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) == TPI_CALLBACK_CONTINUE) ? ::StringToBstr(this->piInfo.szParam.c_str(), szPassword) : E_ABORT;
425425 }
426426 else
427427 {
@@ -464,7 +464,7 @@ STDMETHODIMP CArchiveUpdateCallback::SetCompleted(const wxULongLong_t * nProcess
464464 {
465465 this->piInfo.eStatus = TPI_STATUS_INPROCESS;
466466 this->piInfo.nProcessedSize = * nProcessed - this->nCurrentPos;
467- if (g_prProc == NULL || this->piInfo.fiInfo.szStoredName.IsEmpty() || g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) == TPI_CALLBACK_CONTINUE)
467+ if (g_prProc == nullptr || this->piInfo.fiInfo.szStoredName.IsEmpty() || g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) == TPI_CALLBACK_CONTINUE)
468468 {
469469 return S_OK;
470470 }
@@ -477,15 +477,15 @@ STDMETHODIMP CArchiveUpdateCallback::SetCompleted(const wxULongLong_t * nProcess
477477
478478 STDMETHODIMP CArchiveUpdateCallback::GetUpdateItemInfo(unsigned int /* index */, int *newData, int *newProperties, unsigned int *indexInArchive)
479479 {
480- if (newData != NULL)
480+ if (newData != nullptr)
481481 {
482482 * newData = 1;
483483 }
484- if (newProperties != NULL)
484+ if (newProperties != nullptr)
485485 {
486486 * newProperties = 1;
487487 }
488- if (indexInArchive != NULL)
488+ if (indexInArchive != nullptr)
489489 {
490490 * indexInArchive = (unsigned) -1;
491491 }
@@ -525,7 +525,7 @@ STDMETHODIMP CArchiveUpdateCallback::GetStream(unsigned int nIndex, ISequentialI
525525 if (this->nCurrentPos > 0)
526526 {
527527 this->piInfo.eStatus = TPI_STATUS_ENDPROCESS;
528- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
528+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
529529 {
530530 this->nErrorCode = TPI_ERROR_D_SKIPPED;
531531 return E_ABORT;
@@ -551,7 +551,7 @@ STDMETHODIMP CArchiveUpdateCallback::GetStream(unsigned int nIndex, ISequentialI
551551 this->piInfo.fnDestination = wxFileName(this->piInfo.fiInfo.szStoredName);
552552
553553 // コールバック関数に送信。
554- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
554+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)
555555 {
556556 this->nErrorCode = TPI_ERROR_D_SKIPPED;
557557 return E_ABORT;
@@ -562,7 +562,7 @@ STDMETHODIMP CArchiveUpdateCallback::GetStream(unsigned int nIndex, ISequentialI
562562 return S_OK;
563563 }
564564
565- CInFileStream * inStreamSpec = new CInFileStream;
565+ auto inStreamSpec = new CInFileStream;
566566 CMyComPtr<ISequentialInStream> inStreamLoc(inStreamSpec);
567567 if (! inStreamSpec->Open(this->piInfo.fiInfo.fnFileName.GetFullPath().c_str()))
568568 {
@@ -593,7 +593,7 @@ STDMETHODIMP CArchiveUpdateCallback::GetVolumeSize(unsigned int, wxULongLong_t *
593593
594594 STDMETHODIMP CArchiveUpdateCallback::GetVolumeStream(unsigned int nIndex, ISequentialOutStream ** volumeStream)
595595 {
596- COutFileStream * streamSpec = new COutFileStream;
596+ auto streamSpec = new COutFileStream;
597597 CMyComPtr<ISequentialOutStream> streamLoc(streamSpec);
598598 if (! streamSpec->Create(this->piInfo.fiInfo.fnFileName.GetFullPath() + wxString::Format(wxT(".%03d"), nIndex + 1), false))
599599 {
@@ -625,7 +625,7 @@ int __stdcall GetPluginInformation
625625 void * _pPtr
626626 )
627627 {
628- if (_pPtr == NULL)
628+ if (_pPtr == nullptr)
629629 {
630630 return TPI_ERROR_D_PARAMETER;
631631 }
@@ -662,7 +662,7 @@ int __stdcall GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst)
662662 {
663663 xmlLibrary = myGetNextLib(xmlLibrary);
664664 }
665- if (xmlLibrary == NULL)
665+ if (xmlLibrary == nullptr)
666666 {
667667 // データの終端に達した場合。
668668 return TPI_ERROR_S_ENDOFDATA;
@@ -709,7 +709,7 @@ int __stdcall LoadPlugin
709709 // xml解析開始。
710710 wxXmlDocument xmlDoc(myMakeXMLName(wxT("7zArc")));
711711 wxXmlNode * xmlLibrary = myGetFirstLib(& xmlDoc, _nTypeId);
712- if (xmlLibrary == NULL)
712+ if (xmlLibrary == nullptr)
713713 {
714714 // xml文法エラー。
715715 return TPI_ERROR_UNDEFINED;
@@ -719,7 +719,7 @@ int __stdcall LoadPlugin
719719 }
720720
721721 // コールバック関数を設定。
722- if (_prProc != NULL)
722+ if (_prProc != nullptr)
723723 {
724724 g_prProc = * _prProc;
725725 }
@@ -758,7 +758,7 @@ int __stdcall OpenArchive
758758
759759 // 対応するライブラリを調査。
760760 // 無限ループに陥らないよう上限を設定。
761- for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != NULL; g_LibInfo.nLibIndex++)
761+ for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != nullptr; g_LibInfo.nLibIndex++)
762762 {
763763 // ライブラリをロード。
764764 const GUID guid = {0x23170F69, 0x40C1, 0x278A, {0x10, 0x00, 0x00, 0x01, 0x10, (unsigned char) myGetAttributeInt(xmlLibrary, wxT("name"), 0, 16), 0x00, 0x00}};
@@ -770,7 +770,7 @@ int __stdcall OpenArchive
770770 g_LibInfo.node = * xmlLibrary;
771771
772772 // 書庫を開く。
773- CInFileStream * fileSpec = new CInFileStream;
773+ auto fileSpec = new CInFileStream;
774774 CMyComPtr<IInStream> file = fileSpec;
775775 if (! fileSpec->Open(_szArcName.c_str()))
776776 {
@@ -782,7 +782,7 @@ int __stdcall OpenArchive
782782 MakeFormatInfo(xmlLibrary, wxT("7zArc"), & fiInfo, g_LibInfo.nLibIndex);
783783
784784 // 書庫に対応しているかチェック。
785- CArchiveOpenCallback * openCallbackSpec = new CArchiveOpenCallback;
785+ auto openCallbackSpec = new CArchiveOpenCallback;
786786 CMyComPtr<IArchiveOpenCallback> openCallback(openCallbackSpec);
787787 // SFXを完全に検出するには全体をロードする必要がある。
788788 wxULongLong_t nMax = fiInfo.fSFX ? 262114 : 1024;
@@ -794,7 +794,7 @@ int __stdcall OpenArchive
794794 */
795795 if (hArc->Open(file, & nMax, openCallback) == S_OK)
796796 {
797- if (_nFileCount != NULL)
797+ if (_nFileCount != nullptr)
798798 {
799799 unsigned int n;
800800 hArc->GetNumberOfItems(& n);
@@ -922,7 +922,7 @@ int __stdcall Command
922922 while (GetFileInformation(_hArchive, & fiInfo) == TPI_ERROR_SUCCESS);
923923 }
924924
925- CArchiveExtractCallback * extractCallbackSpec = new CArchiveExtractCallback((IInArchive *) _hArchive, _swInfo);
925+ auto extractCallbackSpec = new CArchiveExtractCallback((IInArchive *) _hArchive, _swInfo);
926926 extractCallbackSpec->fnArchive = fnArchive;
927927 CMyComPtr<IArchiveExtractCallback> extractCallback(extractCallbackSpec);
928928 ((IInArchive *) _hArchive)->Extract(& nIndexes.Front(), nIndexes.Size(), _eCommand == TPI_COMMAND_TEST, extractCallback);
@@ -946,7 +946,7 @@ int __stdcall Command
946946 fiItems.Add(fi);
947947 }
948948
949- COutFileStream * outFileStreamSpec = new COutFileStream;
949+ auto outFileStreamSpec = new COutFileStream;
950950 CMyComPtr<IOutStream> outFileStream = outFileStreamSpec;
951951 IOutArchive * hArc;
952952 if (_eCommand == TPI_COMMAND_CREATE)
@@ -1026,7 +1026,7 @@ int __stdcall Command
10261026 }
10271027
10281028 // 更新処理を実行。
1029- CArchiveUpdateCallback * updateCallbackSpec = new CArchiveUpdateCallback(_swInfo, & fiItems);
1029+ auto updateCallbackSpec = new CArchiveUpdateCallback(_swInfo, & fiItems);
10301030 CMyComPtr<IArchiveUpdateCallback2> updateCallback(updateCallbackSpec);
10311031 hArc->UpdateItems(outFileStream, fiItems.Size(), updateCallback);
10321032 nErrorCode = updateCallbackSpec->nErrorCode;
--- a/src/plugin/Makefile.default
+++ b/src/plugin/Makefile.default
@@ -3,7 +3,7 @@
33
44 # Define compilers.
55 CC = clang++
6-CPPFLAGS = -c -O3 -Wall -Wextra -fno-exceptions -fno-rtti -fPIC `wx-config --cxxflags` $(CPPFLAGS_ADD)
6+CPPFLAGS = -c -O3 -std=c++11 -Wall -Wextra -fno-exceptions -fno-rtti -fPIC `wx-config --cxxflags` $(CPPFLAGS_ADD)
77 LDFLAGS = -s -flto -shared -Wl,-Bsymbolic
88
99 # Define i/o files.
@@ -31,7 +31,7 @@ clean:
3131 rm -f -r $(FULL_OBJS) $(OUT_LIB)
3232
3333 $(OUT_LIB): $(DIR_OBJ) $(FULL_OBJS)
34- $(CC) $(LDFLAGS) -o $(OUT_LIB) -L$(DIR_LIB) -Wl,-soname,$(notdir $(OUT_LIB)) $(FULL_OBJS) `wx-config --libs`
34+ $(CC) $(LDFLAGS) -o $(OUT_LIB) -L$(DIR_LIB) -Wl,-soname,$(notdir $(OUT_LIB)) $(FULL_OBJS) `wx-config --libs core`
3535 chcon -t textrel_shlib_t $(OUT_LIB)
3636
3737 $(DIR_OBJ):
--- a/src/plugin/calLibrary/calLibrary.cpp
+++ b/src/plugin/calLibrary/calLibrary.cpp
@@ -134,14 +134,14 @@ TPI_PROC g_prProc;
134134
135135 #define MySetArcSize(api_base, var) \
136136 fpProc = ::GetAPIAddress(#api_base L"Ex", false); \
137- if (fpProc != NULL) \
137+ if (fpProc != nullptr) \
138138 { \
139139 ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, (LONGLONG *) & _aiInfo->var); \
140140 } \
141141 else \
142142 { \
143143 fpProc = ::GetAPIAddress(#api_base, false); \
144- if (fpProc != NULL) \
144+ if (fpProc != nullptr) \
145145 { \
146146 _aiInfo->var = ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive); \
147147 } \
@@ -149,7 +149,7 @@ TPI_PROC g_prProc;
149149
150150 #define MySetArcTime(api_base, var, ismod) \
151151 fpProc = ::GetAPIAddress(#api_base L"64", false); \
152- if (fpProc != NULL) \
152+ if (fpProc != nullptr) \
153153 { \
154154 ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, & ll); \
155155 _aiInfo->var.Set((time_t) ll); \
@@ -157,7 +157,7 @@ TPI_PROC g_prProc;
157157 else \
158158 { \
159159 fpProc = ::GetAPIAddress(#api_base L"Ex", false); \
160- if (fpProc != NULL) \
160+ if (fpProc != nullptr) \
161161 { \
162162 ((BOOL (__stdcall *)(void *, FILETIME *)) fpProc)(_hArchive, & ft); \
163163 _aiInfo->var = FileTimeToWxDateTime(& ft); \
@@ -165,7 +165,7 @@ TPI_PROC g_prProc;
165165 else \
166166 { \
167167 fpProc = ::GetAPIAddress(#api_base, false); \
168- if (fpProc != NULL) \
168+ if (fpProc != nullptr) \
169169 { \
170170 _aiInfo->var.Set((time_t) ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive)); \
171171 } \
@@ -174,9 +174,9 @@ TPI_PROC g_prProc;
174174 if (ismod) \
175175 { \
176176 fpProc = ::GetAPIAddress("GetArcDate", false); \
177- WORD wDate = fpProc == NULL ? 0 : ((WORD (__stdcall *)(void *)) fpProc)(_hArchive); \
177+ WORD wDate = fpProc == nullptr ? 0 : ((WORD (__stdcall *)(void *)) fpProc)(_hArchive); \
178178 fpProc = ::GetAPIAddress("GetArcTime", false); \
179- WORD wTime = fpProc == NULL ? 0 : ((WORD (__stdcall *)(void *)) fpProc)(_hArchive); \
179+ WORD wTime = fpProc == nullptr ? 0 : ((WORD (__stdcall *)(void *)) fpProc)(_hArchive); \
180180 _aiInfo->var.SetFromDOS(MAKELONG(wTime, wDate)); \
181181 } \
182182 } \
@@ -203,7 +203,7 @@ BOOL __stdcall CallbackProc(HWND, unsigned int _uMsg, unsigned int _uState, void
203203 TPI_PROCESSINFO piInfo;
204204 piInfo.eMessage = TPI_MESSAGE_STATUS;
205205
206- if (_lpEis != NULL)
206+ if (_lpEis != nullptr)
207207 {
208208 if ((g_LibInfo.fRunning && g_LibInfo.fCallback32bit) || (g_LibInfoAlt.fRunning && g_LibInfoAlt.fCallback32bit))
209209 {
@@ -273,7 +273,7 @@ BOOL __stdcall CallbackProc(HWND, unsigned int _uMsg, unsigned int _uState, void
273273 }
274274
275275 // コールバック関数に送信。
276- if (g_prProc == NULL)
276+ if (g_prProc == nullptr)
277277 {
278278 return TRUE;
279279 }
@@ -287,12 +287,12 @@ BOOL __stdcall EnumMembersProc(void * _lpEis)
287287 TPI_PROCESSINFO piInfo;
288288 piInfo.eMessage = TPI_MESSAGE_ASK;
289289 piInfo.eStatus = TPI_PARAM_DEST;
290- if (g_prProc == NULL)
290+ if (g_prProc == nullptr)
291291 {
292292 return TRUE;
293293 }
294294
295- if (_lpEis != NULL)
295+ if (_lpEis != nullptr)
296296 {
297297 if ((g_LibInfo.fRunning && g_LibInfo.fCallback32bit) || (g_LibInfoAlt.fRunning && g_LibInfoAlt.fCallback32bit))
298298 {
@@ -425,7 +425,7 @@ int CalSetCallbackProc(bool fAlt)
425425 if (fAlt)
426426 {
427427 fpProc = ::GetAPIAddressAlt("KillOwnerWindowEx64", false);
428- g_LibInfoAlt.fCallback32bit = fpProc == NULL;
428+ g_LibInfoAlt.fCallback32bit = fpProc == nullptr;
429429 if (g_LibInfoAlt.fCallback32bit)
430430 {
431431 fpProc = ::GetAPIAddressAlt("KillOwnerWindowEx", false);
@@ -434,24 +434,24 @@ int CalSetCallbackProc(bool fAlt)
434434 else
435435 {
436436 fpProc = ::GetAPIAddress("KillOwnerWindowEx64", false);
437- g_LibInfo.fCallback32bit = fpProc == NULL;
437+ g_LibInfo.fCallback32bit = fpProc == nullptr;
438438 if (g_LibInfo.fCallback32bit)
439439 {
440440 fpProc = ::GetAPIAddress("KillOwnerWindowEx", false);
441441 }
442442 }
443- if (fpProc == NULL)
443+ if (fpProc == nullptr)
444444 {
445445 return TPI_ERROR_U_USE_LIBRARY;
446446 }
447447 // エラーでも無視する。
448- ((BOOL (__stdcall *)(HWND)) fpProc)(NULL);
448+ ((BOOL (__stdcall *)(HWND)) fpProc)(nullptr);
449449
450450 // 続いてコールバック関数の設定。
451451 if (fAlt)
452452 {
453453 fpProc = ::GetAPIAddressAlt("SetOwnerWindowEx64", false);
454- g_LibInfoAlt.fCallback32bit = fpProc == NULL;
454+ g_LibInfoAlt.fCallback32bit = fpProc == nullptr;
455455 if (g_LibInfoAlt.fCallback32bit)
456456 {
457457 fpProc = ::GetAPIAddressAlt("SetOwnerWindowEx", true);
@@ -460,16 +460,16 @@ int CalSetCallbackProc(bool fAlt)
460460 else
461461 {
462462 fpProc = ::GetAPIAddress("SetOwnerWindowEx64", false);
463- g_LibInfo.fCallback32bit = fpProc == NULL;
463+ g_LibInfo.fCallback32bit = fpProc == nullptr;
464464 if (g_LibInfo.fCallback32bit)
465465 {
466466 fpProc = ::GetAPIAddress("SetOwnerWindowEx", true);
467467 }
468468 }
469469
470- if (fpProc == NULL || ! ((fAlt ? g_LibInfoAlt.fCallback32bit : g_LibInfo.fCallback32bit)
471- ? ((BOOL (__stdcall *)(HWND, ARCHIVERPROC * )) fpProc)(NULL, (ARCHIVERPROC *) CallbackProc)
472- : ((BOOL (__stdcall *)(HWND, ARCHIVERPROC *, DWORD)) fpProc)(NULL, (ARCHIVERPROC *) CallbackProc, (fAlt ? g_LibInfoAlt.fUnicode : g_LibInfo.fUnicode) ? sizeof(EXTRACTINGINFOEX64W) : sizeof(EXTRACTINGINFOEX64))))
470+ if (fpProc == nullptr || ! ((fAlt ? g_LibInfoAlt.fCallback32bit : g_LibInfo.fCallback32bit)
471+ ? ((BOOL (__stdcall *)(HWND, ARCHIVERPROC * )) fpProc)(nullptr, (ARCHIVERPROC *) CallbackProc)
472+ : ((BOOL (__stdcall *)(HWND, ARCHIVERPROC *, DWORD)) fpProc)(nullptr, (ARCHIVERPROC *) CallbackProc, (fAlt ? g_LibInfoAlt.fUnicode : g_LibInfo.fUnicode) ? sizeof(EXTRACTINGINFOEX64W) : sizeof(EXTRACTINGINFOEX64))))
473473 {
474474 return TPI_ERROR_U_USE_LIBRARY;
475475 }
@@ -478,7 +478,7 @@ int CalSetCallbackProc(bool fAlt)
478478 if (fAlt)
479479 {
480480 fpProc = ::GetAPIAddressAlt("ClearEnumMembersProc64", false);
481- g_LibInfoAlt.fCallback32bit = fpProc == NULL;
481+ g_LibInfoAlt.fCallback32bit = fpProc == nullptr;
482482 if (g_LibInfoAlt.fCallback32bit)
483483 {
484484 fpProc = ::GetAPIAddressAlt("ClearEnumMembersProc", false);
@@ -487,13 +487,13 @@ int CalSetCallbackProc(bool fAlt)
487487 else
488488 {
489489 fpProc = ::GetAPIAddress("ClearEnumMembersProc64", false);
490- g_LibInfo.fCallback32bit = fpProc == NULL;
490+ g_LibInfo.fCallback32bit = fpProc == nullptr;
491491 if (g_LibInfo.fCallback32bit)
492492 {
493493 fpProc = ::GetAPIAddress("ClearEnumMembersProc", false);
494494 }
495495 }
496- if (fpProc == NULL)
496+ if (fpProc == nullptr)
497497 {
498498 return TPI_ERROR_U_USE_LIBRARY;
499499 }
@@ -504,7 +504,7 @@ int CalSetCallbackProc(bool fAlt)
504504 if (fAlt)
505505 {
506506 fpProc = ::GetAPIAddressAlt("SetEnumMembersProc64", false);
507- g_LibInfoAlt.fCallback32bit = fpProc == NULL;
507+ g_LibInfoAlt.fCallback32bit = fpProc == nullptr;
508508 if (g_LibInfoAlt.fCallback32bit)
509509 {
510510 fpProc = ::GetAPIAddressAlt("SetEnumMembersProc", true);
@@ -513,14 +513,14 @@ int CalSetCallbackProc(bool fAlt)
513513 else
514514 {
515515 fpProc = ::GetAPIAddress("SetEnumMembersProc64", false);
516- g_LibInfo.fCallback32bit = fpProc == NULL;
516+ g_LibInfo.fCallback32bit = fpProc == nullptr;
517517 if (g_LibInfo.fCallback32bit)
518518 {
519519 fpProc = ::GetAPIAddress("SetEnumMembersProc", true);
520520 }
521521 }
522522
523- return (fpProc == NULL || ! ((fAlt ? g_LibInfoAlt.fCallback32bit : g_LibInfo.fCallback32bit)
523+ return (fpProc == nullptr || ! ((fAlt ? g_LibInfoAlt.fCallback32bit : g_LibInfo.fCallback32bit)
524524 ? ((BOOL (__stdcall *)(WND_ENUMMEMBPROC * )) fpProc)((WND_ENUMMEMBPROC *) EnumMembersProc)
525525 : ((BOOL (__stdcall *)(WND_ENUMMEMBPROC *, DWORD)) fpProc)((WND_ENUMMEMBPROC *) EnumMembersProc, (fAlt ? g_LibInfoAlt.fUnicode : g_LibInfo.fUnicode) ? sizeof(ENUM_MEMBER_INFO64W) : sizeof(ENUM_MEMBER_INFO))))
526526 ? TPI_ERROR_U_USE_LIBRARY : TPI_ERROR_SUCCESS;
@@ -542,7 +542,7 @@ int __stdcall GetPluginInformation
542542 void * _pPtr
543543 )
544544 {
545- if (_pPtr == NULL)
545+ if (_pPtr == nullptr)
546546 {
547547 return TPI_ERROR_D_PARAMETER;
548548 }
@@ -579,7 +579,7 @@ int __stdcall GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst)
579579 {
580580 xmlLibrary = myGetNextLib(xmlLibrary);
581581 }
582- if (xmlLibrary == NULL)
582+ if (xmlLibrary == nullptr)
583583 {
584584 // データの終端に達した場合。
585585 return TPI_ERROR_S_ENDOFDATA;
@@ -587,7 +587,7 @@ int __stdcall GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst)
587587
588588 MakeFormatInfo(xmlLibrary, wxT("calLibrary"), _fiInfo, s_nFileId++);
589589 HMODULE hLib = ::LoadLibrary(_fiInfo->szEngineName.wchar_str());
590- if (hLib == NULL)
590+ if (hLib == nullptr)
591591 {
592592 _fiInfo->eSupportedCommand = 0;
593593 }
@@ -620,7 +620,7 @@ int __stdcall LoadPlugin
620620 if (! ::wxFileExists(_szArcName))
621621 {
622622 xmlLibrary = myGetFirstLib(& xmlDoc, _nTypeId);
623- if (xmlLibrary == NULL)
623+ if (xmlLibrary == nullptr)
624624 {
625625 // xml文法エラー。
626626 return TPI_ERROR_UNDEFINED;
@@ -628,7 +628,7 @@ int __stdcall LoadPlugin
628628
629629 // ライブラリをロード。
630630 g_LibInfo.hLib = ::LoadLibrary(xmlLibrary->GetAttribute(wxT("name"), wxEmptyString).wchar_str());
631- if (g_LibInfo.hLib == NULL)
631+ if (g_LibInfo.hLib == nullptr)
632632 {
633633 return TPI_ERROR_U_LOAD_LIBRARY;
634634 }
@@ -643,7 +643,7 @@ int __stdcall LoadPlugin
643643 g_LibInfoAlt.hLib = ::LoadLibrary(xmlLibrary->GetAttribute(wxT("name-alt"), wxEmptyString).wchar_str());
644644
645645 // コールバック関数を設定。
646- if (_prProc != NULL)
646+ if (_prProc != nullptr)
647647 {
648648 g_prProc = * _prProc;
649649 CalSetCallbackProc(true);
@@ -654,11 +654,11 @@ int __stdcall LoadPlugin
654654
655655 // 無限ループに陥らないよう上限を設定。
656656 xmlLibrary = myGetFirstLib(& xmlDoc);
657- for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != NULL; g_LibInfo.nLibIndex++)
657+ for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != nullptr; g_LibInfo.nLibIndex++)
658658 {
659659 // ライブラリをロード。
660660 g_LibInfo.hLib = ::LoadLibrary(xmlLibrary->GetAttribute(wxT("name"), wxEmptyString).wchar_str());
661- if (g_LibInfo.hLib == NULL)
661+ if (g_LibInfo.hLib == nullptr)
662662 {
663663 xmlLibrary = myGetNextLib(xmlLibrary);
664664 continue;
@@ -674,19 +674,19 @@ int __stdcall LoadPlugin
674674
675675 // Unicodeモードに設定。
676676 FARPROC fpProc = ::GetAPIAddress("SetUnicodeMode", false);
677- if (fpProc != NULL)
677+ if (fpProc != nullptr)
678678 {
679679 ((BOOL (__stdcall *)(BOOL)) fpProc)(TRUE);
680680 }
681681
682682 // 書庫に対応しているかチェック。
683683 fpProc = ::GetAPIAddress("CheckArchive", true);
684- if (fpProc != NULL && (g_LibInfo.fUnicode
684+ if (fpProc != nullptr && (g_LibInfo.fUnicode
685685 ? ((BOOL (__stdcall *)(const wchar_t *, const int)) fpProc)(_szArcName.wchar_str(), 0)
686686 : ((BOOL (__stdcall *)(const char *, const int)) fpProc)(_szArcName.ToUTF8(), 0)))
687687 {
688688 // コールバック関数を設定。
689- if (_prProc != NULL)
689+ if (_prProc != nullptr)
690690 {
691691 g_prProc = * _prProc;
692692 CalSetCallbackProc(true);
@@ -720,10 +720,10 @@ int __stdcall OpenArchive
720720 {
721721 // ファイル数を取得。
722722 FARPROC fpProc;
723- if (_nFileCount != NULL)
723+ if (_nFileCount != nullptr)
724724 {
725725 fpProc = ::GetAPIAddress("GetFileCount", true);
726- if (fpProc != NULL)
726+ if (fpProc != nullptr)
727727 {
728728 int n = g_LibInfo.fUnicode
729729 ? ((int (__stdcall *)(const wchar_t *)) fpProc)(_szArcName.wchar_str())
@@ -733,15 +733,15 @@ int __stdcall OpenArchive
733733 }
734734
735735 fpProc = ::GetAPIAddress("OpenArchive", true);
736- if (fpProc == NULL)
736+ if (fpProc == nullptr)
737737 {
738738 return TPI_ERROR_U_USE_LIBRARY;
739739 }
740740
741741 * _hArchive = g_LibInfo.fUnicode
742- ? ((void * (__stdcall *)(const HWND, const wchar_t *, const DWORD)) fpProc)(NULL, _szArcName.wchar_str(), 0)
743- : ((void * (__stdcall *)(const HWND, const char *, const DWORD)) fpProc)(NULL, _szArcName.ToUTF8(), 0);
744- return _hArchive == NULL ? TPI_ERROR_UNDEFINED : TPI_ERROR_SUCCESS;
742+ ? ((void * (__stdcall *)(const HWND, const wchar_t *, const DWORD)) fpProc)(nullptr, _szArcName.wchar_str(), 0)
743+ : ((void * (__stdcall *)(const HWND, const char *, const DWORD)) fpProc)(nullptr, _szArcName.ToUTF8(), 0);
744+ return _hArchive == nullptr ? TPI_ERROR_UNDEFINED : TPI_ERROR_SUCCESS;
745745 }
746746
747747 int __stdcall CloseArchive
@@ -750,7 +750,7 @@ int __stdcall CloseArchive
750750 )
751751 {
752752 FARPROC fpProc = ::GetAPIAddress("CloseArchive", false);
753- return fpProc == NULL ? TPI_ERROR_U_USE_LIBRARY : ErrorCodeConvert(((int (__stdcall *)(void *)) fpProc)(_hArchive));
753+ return fpProc == nullptr ? TPI_ERROR_U_USE_LIBRARY : ErrorCodeConvert(((int (__stdcall *)(void *)) fpProc)(_hArchive));
754754 }
755755
756756 int __stdcall GetFileInformation
@@ -775,7 +775,7 @@ int __stdcall GetFileInformation
775775 fpNext = ::GetAPIAddress("FindNext", true);
776776 fpAttr = ::GetAPIAddress("GetAttribute", false);
777777 fpName = ::GetAPIAddress("GetFileName", true);
778- if (fpProc == NULL)
778+ if (fpProc == nullptr)
779779 {
780780 return TPI_ERROR_U_USE_LIBRARY;
781781 }
@@ -786,7 +786,7 @@ int __stdcall GetFileInformation
786786 }
787787 else
788788 {
789- if (fpNext == NULL)
789+ if (fpNext == nullptr)
790790 {
791791 return TPI_ERROR_U_USE_LIBRARY;
792792 }
@@ -799,7 +799,7 @@ int __stdcall GetFileInformation
799799 nErrorCode = ErrorCodeConvert(nErrorCode);
800800 if (nErrorCode == TPI_ERROR_SUCCESS)
801801 {
802- _fiInfo->dwAttribute = (fpAttr == NULL) ? 0 : ((int (__stdcall *)(void *)) fpAttr)(_hArchive);
802+ _fiInfo->dwAttribute = (fpAttr == nullptr) ? 0 : ((int (__stdcall *)(void *)) fpAttr)(_hArchive);
803803 if (_fiInfo->dwAttribute == (unsigned) -1)
804804 {
805805 _fiInfo->dwAttribute = 0;
@@ -855,7 +855,7 @@ int __stdcall GetArchiveInformation
855855 )
856856 {
857857 FARPROC fpProc = ::GetAPIAddress("GetArcFileName", true);
858- if (fpProc != NULL)
858+ if (fpProc != nullptr)
859859 {
860860 // TODO : ファイル名の文字数制限を撤廃。
861861 wxString s;
@@ -893,7 +893,7 @@ int __stdcall GetArchiveInformation
893893 MySetArcTime(GetArcWriteTime, tmModify, true);
894894
895895 fpProc = ::GetAPIAddress("GetArcRatio", false);
896- if (fpProc != NULL)
896+ if (fpProc != nullptr)
897897 {
898898 _aiInfo->wCompressRatio = ((WORD (__stdcall *)(void *)) fpProc)(_hArchive);
899899 if (_aiInfo->wCompressRatio == (WORD) -1)
@@ -904,13 +904,13 @@ int __stdcall GetArchiveInformation
904904 }
905905
906906 fpProc = ::GetAPIAddress("GetArcOSType", false);
907- if (fpProc != NULL)
907+ if (fpProc != nullptr)
908908 {
909909 _aiInfo->eOSType = ((UINT (__stdcall *)(void *)) fpProc)(_hArchive);
910910 }
911911
912912 fpProc = ::GetAPIAddress("IsSFXFile", false);
913- _aiInfo->fSFX = fpProc != NULL && ((int (__stdcall *)(void *)) fpProc)(_hArchive) > 0;
913+ _aiInfo->fSFX = fpProc != nullptr && ((int (__stdcall *)(void *)) fpProc)(_hArchive) > 0;
914914
915915 // 形式に関する情報を取得。
916916 MakeFormatInfo(& g_LibInfo.node, wxT("calLibrary"), & _aiInfo->fiInfo, 0);
@@ -957,8 +957,8 @@ int __stdcall Command
957957
958958 FARPROC fpProc =
959959 g_LibInfo.fRunning ? ::GetAPIAddress( "", true) :
960- g_LibInfoAlt.fRunning ? ::GetAPIAddressAlt("", true) : NULL;
961- if (fpProc == NULL || szCommandLine.IsEmpty())
960+ g_LibInfoAlt.fRunning ? ::GetAPIAddressAlt("", true) : nullptr;
961+ if (fpProc == nullptr || szCommandLine.IsEmpty())
962962 {
963963 return TPI_ERROR_U_USE_LIBRARY;
964964 }
@@ -976,13 +976,13 @@ int __stdcall Command
976976 if ((g_LibInfo.fRunning && g_LibInfo.fUnicode) || (g_LibInfoAlt.fRunning && g_LibInfoAlt.fUnicode))
977977 {
978978 wchar_t szTmpOut[2049];
979- nErrorCode = ((int (__stdcall *)(const HWND, const wchar_t *, wchar_t *, DWORD)) fpProc)(NULL, szCommandLineSend.wchar_str(), szTmpOut, 2048);
979+ nErrorCode = ((int (__stdcall *)(const HWND, const wchar_t *, wchar_t *, DWORD)) fpProc)(nullptr, szCommandLineSend.wchar_str(), szTmpOut, 2048);
980980 szOutput = WC2String(szTmpOut);
981981 }
982982 else
983983 {
984984 char szTmpOut[2049];
985- nErrorCode = ((int (__stdcall *)(const HWND, const char *, char *, DWORD)) fpProc)(NULL, szCommandLineSend.ToUTF8(), szTmpOut, 2048);
985+ nErrorCode = ((int (__stdcall *)(const HWND, const char *, char *, DWORD)) fpProc)(nullptr, szCommandLineSend.ToUTF8(), szTmpOut, 2048);
986986 szOutput = UTF82String(szTmpOut);
987987 }
988988
--- a/src/plugin/cuiWrapper/cuiWrapper.cpp
+++ b/src/plugin/cuiWrapper/cuiWrapper.cpp
@@ -58,13 +58,13 @@ int myExecute(const wxString & szCommandLine, wxString * szOutput, const wxStrin
5858 ::wxSetWorkingDirectory(szCwd);
5959 FILE * fp = popen(fWine ? (wxT("wine ") + szCommandLine).ToUTF8() : szCommandLine.ToUTF8(), "r");
6060 ::wxSetWorkingDirectory(sz);
61- if (fp == NULL)
61+ if (fp == nullptr)
6262 {
6363 wxLogError(L"Error :\n\nCommandLine:\n%s", szCommandLine.c_str());
6464 return TPI_ERROR_U_USE_LIBRARY;
6565 }
6666
67- if (szOutput != NULL)
67+ if (szOutput != nullptr)
6868 {
6969 char sz[32769];
7070 while (! feof(fp))
@@ -96,30 +96,30 @@ int myExecute(const wxString & szCommandLine, wxString * szOutput, const wxStrin
9696 si.hStdOutput = hWrite;
9797 si.hStdError = hWrite;
9898 PROCESS_INFORMATION pi;
99- if (! ::CreateProcess(NULL, szCommandLine.wchar_str(), NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, szCwd.IsEmpty() ? NULL : szCwd.wchar_str(), & si, & pi))
99+ if (! ::CreateProcess(nullptr, szCommandLine.wchar_str(), nullptr, nullptr, TRUE, CREATE_NO_WINDOW, nullptr, szCwd.IsEmpty() ? nullptr : szCwd.wchar_str(), & si, & pi))
100100 {
101101 return TPI_ERROR_U_USE_LIBRARY;
102102 }
103103 ::CloseHandle(pi.hThread);
104104
105- if (szOutput != NULL)
105+ if (szOutput != nullptr)
106106 {
107107 bool bSignal;
108108 do
109109 {
110110 DWORD dwSize = 0;
111111 bSignal = ::WaitForSingleObject(pi.hProcess, 100) == WAIT_OBJECT_0;
112- ::PeekNamedPipe(hRead, NULL, 0, NULL, & dwSize, NULL);
112+ ::PeekNamedPipe(hRead, nullptr, 0, nullptr, & dwSize, nullptr);
113113 while (dwSize > 0)
114114 {
115115 char sz[4097];
116116 memset(sz, 0, sizeof(sz));
117- ::ReadFile(hRead, & sz, sizeof(sz) - 1, & dwSize, NULL);
117+ ::ReadFile(hRead, & sz, sizeof(sz) - 1, & dwSize, nullptr);
118118 * szOutput += wxString(sz);
119119 // UTF-8以外の文字コードだと、UTF82Stringを使うと書庫が開けなくなる。データの切り出しにも影響。
120120 // * szOutput += UTF82String(sz);
121-// ::MessageBoxA(NULL, sz, NULL, 0);
122- ::PeekNamedPipe(hRead, NULL, 0, NULL, & dwSize, NULL);
121+// ::MessageBoxA(nullptr, sz, nullptr, 0);
122+ ::PeekNamedPipe(hRead, nullptr, 0, nullptr, & dwSize, nullptr);
123123 }
124124 }
125125 while (! bSignal);
@@ -170,7 +170,7 @@ int __stdcall GetPluginInformation
170170 void * _pPtr
171171 )
172172 {
173- if (_pPtr == NULL)
173+ if (_pPtr == nullptr)
174174 {
175175 return TPI_ERROR_D_PARAMETER;
176176 }
@@ -207,14 +207,14 @@ int __stdcall GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst)
207207 {
208208 xmlLibrary = myGetNextLib(xmlLibrary);
209209 }
210- if (xmlLibrary == NULL)
210+ if (xmlLibrary == nullptr)
211211 {
212212 // データの終端に達した場合。
213213 return TPI_ERROR_S_ENDOFDATA;
214214 }
215215
216216 MakeFormatInfo(xmlLibrary, wxT("cuiWrapper"), _fiInfo, s_nFileId++);
217- if (myExecute(_fiInfo->szEngineName, NULL, wxEmptyString, _fiInfo->szEngineName.MakeLower().EndsWith(wxT(".exe"))) != TPI_ERROR_SUCCESS)
217+ if (myExecute(_fiInfo->szEngineName, nullptr, wxEmptyString, _fiInfo->szEngineName.MakeLower().EndsWith(wxT(".exe"))) != TPI_ERROR_SUCCESS)
218218 {
219219 _fiInfo->eSupportedCommand = 0;
220220 }
@@ -233,7 +233,7 @@ int __stdcall LoadPlugin
233233 wxXmlNode * xmlLibrary;
234234
235235 // コールバック関数を設定。
236- if (_prProc != NULL)
236+ if (_prProc != nullptr)
237237 {
238238 g_prProc = * _prProc;
239239 }
@@ -248,7 +248,7 @@ int __stdcall LoadPlugin
248248 if (! ::wxFileExists(_szArcName))
249249 {
250250 xmlLibrary = myGetFirstLib(& xmlDoc, _nTypeId);
251- if (xmlLibrary == NULL)
251+ if (xmlLibrary == nullptr)
252252 {
253253 // xml文法エラー。
254254 return TPI_ERROR_UNDEFINED;
@@ -262,7 +262,7 @@ int __stdcall LoadPlugin
262262
263263 // 無限ループに陥らないよう上限を設定。
264264 xmlLibrary = myGetFirstLib(& xmlDoc);
265- for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != NULL; g_LibInfo.nLibIndex++)
265+ for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != nullptr; g_LibInfo.nLibIndex++)
266266 {
267267 // 書庫に対応しているかチェック。
268268 wxFileName fnArchive(_szArcName);
@@ -314,7 +314,7 @@ int __stdcall OpenArchive
314314 wxArrayString * as = new wxArrayString(::wxStringTokenize(szOutput, wxT("\r\n")));
315315 * _hArchive = (void *) as;
316316 as->Shrink();
317- if (_nFileCount != NULL)
317+ if (_nFileCount != nullptr)
318318 {
319319 * _nFileCount = as->GetCount();
320320 }
@@ -350,7 +350,7 @@ int __stdcall GetFileInformation
350350 {
351351 static size_t s_nCurrentLine;
352352 static wxULongLong_t s_nFileId;
353- if (_hArchive == NULL)
353+ if (_hArchive == nullptr)
354354 {
355355 return TPI_ERROR_UNDEFINED;
356356 }
--- a/src/plugin/eggArc/eggArc.cpp
+++ b/src/plugin/eggArc/eggArc.cpp
@@ -69,7 +69,7 @@ int __stdcall GetFileInformation2
6969 )
7070 {
7171 static FARPROC fpProc = ::GetAPIAddress("GetFileHeader");
72- if (fpProc == NULL)
72+ if (fpProc == nullptr)
7373 {
7474 return TPI_ERROR_U_USE_LIBRARY;
7575 }
@@ -126,7 +126,7 @@ UINT __cdecl CallbackProc(void * user, UINT code, void* param)
126126 piInfo.eMessage = TPI_MESSAGE_ASK;
127127 piInfo.eStatus = TPI_PARAM_DEST;
128128 piInfo.fnDestination = wxFileName(g_swInfo->fnDestinationDirectory.GetPathWithSep() + (g_swInfo->fStoreDirectoryPathes ? piInfo.fiInfo.fnFileName.GetFullPath() : piInfo.fiInfo.fnFileName.GetFullName()));
129- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
129+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
130130 {
131131 return EGG_ERROR_CANCEL;
132132 }
@@ -181,7 +181,7 @@ UINT __cdecl CallbackProc(void * user, UINT code, void* param)
181181 }
182182
183183 // 2回目以降はコールバック関数に送信する。
184- if (g_prProc == NULL || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
184+ if (g_prProc == nullptr || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
185185 {
186186 return EGG_ERROR_CANCEL;
187187 }
@@ -196,7 +196,7 @@ UINT __cdecl CallbackProc(void * user, UINT code, void* param)
196196 }
197197
198198 // コールバック関数に送信。
199- if (g_prProc == NULL)
199+ if (g_prProc == nullptr)
200200 {
201201 return EGG_ERROR_SUCCESS;
202202 }
@@ -220,7 +220,7 @@ int __stdcall GetPluginInformation
220220 void * _pPtr
221221 )
222222 {
223- if (_pPtr == NULL)
223+ if (_pPtr == nullptr)
224224 {
225225 return TPI_ERROR_D_PARAMETER;
226226 }
@@ -274,14 +274,14 @@ int __stdcall LoadPlugin
274274 {
275275 ::RemoveCwdFromSearchPath();
276276 g_hLib = ::LoadLibrary(L"UnEGG32.dll");
277- if (g_hLib == NULL)
277+ if (g_hLib == nullptr)
278278 {
279279 ::FreeLibrary(g_hLib);
280280 return TPI_ERROR_U_LOAD_LIBRARY;
281281 }
282282
283283 // コールバック関数を設定。
284- if (_prProc != NULL)
284+ if (_prProc != nullptr)
285285 {
286286 g_prProc = * _prProc;
287287 }
@@ -305,7 +305,7 @@ int __stdcall OpenArchive
305305 )
306306 {
307307 FARPROC fpProc = ::GetAPIAddress("IsValidArchive");
308- if (fpProc == NULL)
308+ if (fpProc == nullptr)
309309 {
310310 return TPI_ERROR_U_USE_LIBRARY;
311311 }
@@ -318,7 +318,7 @@ int __stdcall OpenArchive
318318 }
319319
320320 fpProc = ::GetAPIAddress("CreateEgg");
321- if (fpProc == NULL)
321+ if (fpProc == nullptr)
322322 {
323323 return TPI_ERROR_U_USE_LIBRARY;
324324 }
@@ -327,13 +327,13 @@ int __stdcall OpenArchive
327327 {
328328 return nErrorCode;
329329 }
330- if (_hArchive == NULL)
330+ if (_hArchive == nullptr)
331331 {
332332 return TPI_ERROR_UNDEFINED;
333333 }
334334
335335 fpProc = ::GetAPIAddress("OpenArchive");
336- if (fpProc == NULL)
336+ if (fpProc == nullptr)
337337 {
338338 return TPI_ERROR_U_USE_LIBRARY;
339339 }
@@ -343,10 +343,10 @@ int __stdcall OpenArchive
343343 return nErrorCode;
344344 }
345345
346- if (_nFileCount != NULL)
346+ if (_nFileCount != nullptr)
347347 {
348348 fpProc = ::GetAPIAddress("GetFileCount");
349- if (fpProc == NULL)
349+ if (fpProc == nullptr)
350350 {
351351 CloseArchive(* _hArchive);
352352 return TPI_ERROR_U_USE_LIBRARY;
@@ -370,7 +370,7 @@ int __stdcall CloseArchive
370370 )
371371 {
372372 FARPROC fpProc = ::GetAPIAddress("CloseArchive");
373- if (fpProc == NULL || _hArchive == NULL)
373+ if (fpProc == nullptr || _hArchive == nullptr)
374374 {
375375 return TPI_ERROR_U_USE_LIBRARY;
376376 }
@@ -381,7 +381,7 @@ int __stdcall CloseArchive
381381 }
382382
383383 fpProc = ::GetAPIAddress("DestroyEgg");
384- return fpProc == NULL ? TPI_ERROR_U_USE_LIBRARY : ErrorCodeConvert(((UINT (__cdecl *)(void **)) fpProc)(& _hArchive));
384+ return fpProc == nullptr ? TPI_ERROR_U_USE_LIBRARY : ErrorCodeConvert(((UINT (__cdecl *)(void **)) fpProc)(& _hArchive));
385385 }
386386
387387 int __stdcall GetFileInformation
@@ -397,7 +397,7 @@ int __stdcall GetFileInformation
397397 {
398398 s_nFileId = 0;
399399 FARPROC fpProc = ::GetAPIAddress("GetFileCount");
400- if (fpProc == NULL)
400+ if (fpProc == nullptr)
401401 {
402402 return TPI_ERROR_U_USE_LIBRARY;
403403 }
@@ -438,7 +438,7 @@ int __stdcall Command
438438 g_asFiles = & _szFiles;
439439
440440 FARPROC fpProc = _eCommand == TPI_COMMAND_EXTRACT ? ::GetAPIAddress("Extract") : ::GetAPIAddress("Test");
441- return fpProc == NULL ? TPI_ERROR_U_USE_LIBRARY : ErrorCodeConvert(((UINT (__cdecl *)(void *)) fpProc)(_hArchive));
441+ return fpProc == nullptr ? TPI_ERROR_U_USE_LIBRARY : ErrorCodeConvert(((UINT (__cdecl *)(void *)) fpProc)(_hArchive));
442442 }
443443
444444 #ifdef __cplusplus
--- a/src/plugin/rarArc/rarArc.cpp
+++ b/src/plugin/rarArc/rarArc.cpp
@@ -87,7 +87,7 @@ int __stdcall CallbackProc(unsigned int msg, long p, long P1, long P2)
8787 }
8888
8989 // コールバック関数に送信。
90- if (g_prProc == NULL || g_prProc(TPI_NOTIFY_COMMON, piInfo) == TPI_CALLBACK_CONTINUE)
90+ if (g_prProc == nullptr || g_prProc(TPI_NOTIFY_COMMON, piInfo) == TPI_CALLBACK_CONTINUE)
9191 {
9292 if (msg == UCM_NEEDPASSWORDW || (msg == UCM_CHANGEVOLUMEW && P2 == RAR_VOL_ASK))
9393 {
@@ -150,7 +150,7 @@ int __stdcall GetPluginInformation
150150 void * _pPtr
151151 )
152152 {
153- if (_pPtr == NULL)
153+ if (_pPtr == nullptr)
154154 {
155155 return TPI_ERROR_D_PARAMETER;
156156 }
@@ -211,7 +211,7 @@ int __stdcall LoadPlugin
211211 }
212212
213213 // コールバック関数を設定。
214- if (_prProc != NULL)
214+ if (_prProc != nullptr)
215215 {
216216 g_prProc = * _prProc;
217217 }
@@ -245,7 +245,7 @@ int __stdcall OpenArchive
245245 }
246246
247247 memset(& g_oaInfo, 0, sizeof(g_oaInfo));
248- g_oaInfo.ArcName = NULL;
248+ g_oaInfo.ArcName = nullptr;
249249 // g_oaInfo.ArcNameW = _szArcName.wchar_str();
250250 g_oaInfo.ArcNameW = (wchar_t *) malloc((_szArcName.Len() + 1) * sizeof(wchar_t));
251251 wcscpy(g_oaInfo.ArcNameW, _szArcName.wchar_str());
@@ -255,7 +255,7 @@ int __stdcall OpenArchive
255255 g_oaInfo.Callback = CallbackProc;
256256 * _hArchive = ((void * (__stdcall *)(RAROpenArchiveDataEx *)) p)(& g_oaInfo);
257257 free(g_oaInfo.ArcNameW);
258- return * _hArchive == NULL ? TPI_ERROR_UNDEFINED : ErrorCodeConvert(g_oaInfo.OpenResult);
258+ return * _hArchive == nullptr ? TPI_ERROR_UNDEFINED : ErrorCodeConvert(g_oaInfo.OpenResult);
259259 }
260260
261261 int __stdcall CloseArchive
@@ -268,7 +268,7 @@ int __stdcall CloseArchive
268268 return TPI_ERROR_U_USE_LIBRARY;
269269 }
270270 void * p = g_hLib.GetSymbol(wxT("RARCloseArchive"));
271- return (! p || _hArchive == NULL) ? TPI_ERROR_U_USE_LIBRARY : ErrorCodeConvert(((int (__stdcall *)(void *)) p)(_hArchive));
271+ return (! p || _hArchive == nullptr) ? TPI_ERROR_U_USE_LIBRARY : ErrorCodeConvert(((int (__stdcall *)(void *)) p)(_hArchive));
272272 }
273273
274274 int __stdcall GetFileInformation
@@ -285,8 +285,8 @@ int __stdcall GetFileInformation
285285 if (_bFirst)
286286 {
287287 s_nFileId = 0;
288- pR = g_hLib.HasSymbol(wxT("RARReadHeaderEx")) ? g_hLib.GetSymbol(wxT("RARReadHeaderEx")) : NULL;
289- pP = g_hLib.HasSymbol(wxT("RARProcessFileW")) ? g_hLib.GetSymbol(wxT("RARProcessFileW")) : NULL;
288+ pR = g_hLib.HasSymbol(wxT("RARReadHeaderEx")) ? g_hLib.GetSymbol(wxT("RARReadHeaderEx")) : nullptr;
289+ pP = g_hLib.HasSymbol(wxT("RARProcessFileW")) ? g_hLib.GetSymbol(wxT("RARProcessFileW")) : nullptr;
290290 if (! pR || ! pP)
291291 {
292292 return TPI_ERROR_U_USE_LIBRARY;
@@ -328,7 +328,7 @@ int __stdcall GetFileInformation
328328 _fiInfo->fnFileName = wxFileName(_fiInfo->szStoredName);
329329
330330 // 次のファイルへ。
331- nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, int, wchar_t *, wchar_t *)) pP)(_hArchive, RAR_SKIP, NULL, NULL));
331+ nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, int, wchar_t *, wchar_t *)) pP)(_hArchive, RAR_SKIP, nullptr, nullptr));
332332 }
333333
334334 return nErrorCode;
@@ -375,13 +375,13 @@ int __stdcall Command
375375 piInfo.eMessage = TPI_MESSAGE_STATUS;
376376 piInfo.eStatus = TPI_STATUS_OPENARCHIVE;
377377 piInfo.fiInfo.fnFileName = wxFileName(_swInfo->szArcName);
378- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
378+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
379379 {
380380 return TPI_ERROR_D_SKIPPED;
381381 }
382382 RAROpenArchiveDataEx oaInfo;
383383 memset(& oaInfo, 0, sizeof(oaInfo));
384- oaInfo.ArcName = NULL;
384+ oaInfo.ArcName = nullptr;
385385 // oaInfo.ArcNameW = _swInfo->szArcName.wchar_str();
386386 oaInfo.ArcNameW = (wchar_t *) malloc((_swInfo->szArcName.Len() + 1) * sizeof(wchar_t));
387387 wcscpy(oaInfo.ArcNameW, _swInfo->szArcName.wchar_str());
@@ -391,7 +391,7 @@ int __stdcall Command
391391 oaInfo.UserData = (long) & piInfo;
392392 void * hArc = ((void * (__stdcall *)(RAROpenArchiveDataEx *)) p)(& oaInfo);
393393 free(oaInfo.ArcNameW);
394- if (hArc == NULL)
394+ if (hArc == nullptr)
395395 {
396396 return TPI_ERROR_UNDEFINED;
397397 }
@@ -402,9 +402,9 @@ int __stdcall Command
402402 }
403403
404404 void
405- * pS = g_hLib.HasSymbol(wxT("RARSetPassword")) ? g_hLib.GetSymbol(wxT("RARSetPassword")) : NULL,
406- * pR = g_hLib.HasSymbol(wxT("RARReadHeaderEx")) ? g_hLib.GetSymbol(wxT("RARReadHeaderEx")) : NULL,
407- * pP = g_hLib.HasSymbol(wxT("RARProcessFileW")) ? g_hLib.GetSymbol(wxT("RARProcessFileW")) : NULL;
405+ * pS = g_hLib.HasSymbol(wxT("RARSetPassword")) ? g_hLib.GetSymbol(wxT("RARSetPassword")) : nullptr,
406+ * pR = g_hLib.HasSymbol(wxT("RARReadHeaderEx")) ? g_hLib.GetSymbol(wxT("RARReadHeaderEx")) : nullptr,
407+ * pP = g_hLib.HasSymbol(wxT("RARProcessFileW")) ? g_hLib.GetSymbol(wxT("RARProcessFileW")) : nullptr;
408408 if (! pR || ! pP)
409409 {
410410 CloseArchive(hArc);
@@ -430,7 +430,7 @@ int __stdcall Command
430430 piInfo.fiInfo.nUnpackedSize = piInfo.fiInfo.nUnpackedSize << 32;
431431 piInfo.fiInfo.nUnpackedSize += hdInfo.UnpSize;
432432 piInfo.fiInfo.tmModify.SetFromDOS(hdInfo.FileTime);
433- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
433+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
434434 {
435435 nErrorCode = TPI_ERROR_D_SKIPPED;
436436 break;
@@ -443,21 +443,21 @@ int __stdcall Command
443443 // 処理の開始を通知。
444444 piInfo.eMessage = TPI_MESSAGE_STATUS;
445445 piInfo.eStatus = TPI_STATUS_BEGINPROCESS;
446- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
446+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
447447 {
448448 nErrorCode = TPI_ERROR_D_SKIPPED;
449449 break;
450450 }
451451 }
452452
453- nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, int, wchar_t *, wchar_t *)) pP)(hArc, bSkip ? RAR_SKIP : _eCommand == TPI_COMMAND_EXTRACT ? RAR_EXTRACT : RAR_TEST, NULL, piInfo.fnDestination.GetFullPath().wchar_str()));
453+ nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, int, wchar_t *, wchar_t *)) pP)(hArc, bSkip ? RAR_SKIP : _eCommand == TPI_COMMAND_EXTRACT ? RAR_EXTRACT : RAR_TEST, nullptr, piInfo.fnDestination.GetFullPath().wchar_str()));
454454
455455 if (! bSkip)
456456 {
457457 // 処理の終了を通知。
458458 piInfo.eMessage = TPI_MESSAGE_STATUS;
459459 piInfo.eStatus = TPI_STATUS_ENDPROCESS;
460- if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
460+ if (g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
461461 {
462462 nErrorCode = TPI_ERROR_D_SKIPPED;
463463 break;
--- a/src/plugin/spiLibrary/spiLibrary.cpp
+++ b/src/plugin/spiLibrary/spiLibrary.cpp
@@ -50,7 +50,7 @@ int __stdcall CallbackProc(int _nNow, int, long _lData)
5050 piInfo->nProcessedSize = _nNow;
5151
5252 // コールバック関数に送信。
53- return g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, piInfo) == TPI_CALLBACK_CANCEL;
53+ return g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, piInfo) == TPI_CALLBACK_CANCEL;
5454 }
5555
5656 //******************************************************************************
@@ -89,7 +89,7 @@ int __stdcall GetPluginInformation
8989 void * _pPtr
9090 )
9191 {
92- if (_pPtr == NULL)
92+ if (_pPtr == nullptr)
9393 {
9494 return TPI_ERROR_D_PARAMETER;
9595 }
@@ -155,15 +155,15 @@ int __stdcall LoadPlugin
155155 {
156156 // SPIをロード。
157157 g_hLib = ::LoadLibrary((g_szLibPath + szSPIName).wchar_str());
158- if (g_hLib == NULL)
158+ if (g_hLib == nullptr)
159159 {
160160 continue;
161161 }
162162
163163 // GetPluginInfoを実行。
164164 FARPROC fpProc = ::GetProcAddress(g_hLib, "GetPluginInfo");
165- char szPluginType[5]; // 種類4bytes + NULL
166- if (fpProc == NULL
165+ char szPluginType[5]; // 種類4bytes + nullptr
166+ if (fpProc == nullptr
167167 || ((int (PASCAL *)(int, char *, int)) fpProc)(0, szPluginType, sizeof(szPluginType)) <= 0
168168 || szPluginType[2] != 'A' || szPluginType[3] != 'M')
169169 {
@@ -173,7 +173,7 @@ int __stdcall LoadPlugin
173173
174174 // 書庫に対応しているかチェック。
175175 fpProc = ::GetProcAddress(g_hLib, "IsSupported");
176- if (fpProc == NULL)
176+ if (fpProc == nullptr)
177177 {
178178 ::FreeLibrary(g_hLib);
179179 continue;
@@ -182,7 +182,7 @@ int __stdcall LoadPlugin
182182 if (((BOOL (PASCAL *)(const char *, unsigned long)) fpProc)(_szArcName.ToUTF8(), (unsigned long) buffer))
183183 {
184184 // コールバック関数を設定。
185- if (_prProc != NULL)
185+ if (_prProc != nullptr)
186186 {
187187 g_prProc = * _prProc;
188188 }
@@ -211,7 +211,7 @@ int __stdcall OpenArchive
211211 )
212212 {
213213 FARPROC fpProc = ::GetProcAddress(g_hLib, "GetArchiveInfo");
214- if (fpProc == NULL)
214+ if (fpProc == nullptr)
215215 {
216216 return TPI_ERROR_U_USE_LIBRARY;
217217 }
@@ -221,11 +221,11 @@ int __stdcall OpenArchive
221221 {
222222 return nReturnCode;
223223 }
224- if (_nFileCount != NULL)
224+ if (_nFileCount != nullptr)
225225 {
226226 * _nFileCount = ::LocalSize(* _hArchive) / sizeof(fileInfo);
227227 }
228- return * _hArchive == NULL ? TPI_ERROR_IO_ARC_OPEN : nReturnCode;
228+ return * _hArchive == nullptr ? TPI_ERROR_IO_ARC_OPEN : nReturnCode;
229229 }
230230
231231 int __stdcall CloseArchive
@@ -233,7 +233,7 @@ int __stdcall CloseArchive
233233 void * _hArchive
234234 )
235235 {
236- return ::LocalFree(_hArchive) == NULL ? TPI_ERROR_SUCCESS : TPI_ERROR_IO_ARC_CLOSE;
236+ return ::LocalFree(_hArchive) == nullptr ? TPI_ERROR_SUCCESS : TPI_ERROR_IO_ARC_CLOSE;
237237 }
238238
239239 int __stdcall GetFileInformation
@@ -288,7 +288,7 @@ int __stdcall GetArchiveInformation
288288 {
289289 // GetPluginInfoを実行。
290290 FARPROC fpProc = ::GetProcAddress(g_hLib, "GetPluginInfo");
291- if (fpProc != NULL)
291+ if (fpProc != nullptr)
292292 {
293293 char szTemp[513];
294294 memset(szTemp, 0, sizeof(szTemp));
@@ -326,7 +326,7 @@ int __stdcall Command
326326
327327 // 展開処理のみを行う。
328328 FARPROC fpProc = ::GetProcAddress(g_hLib, "GetFile");
329- if (fpProc == NULL)
329+ if (fpProc == nullptr)
330330 {
331331 return TPI_ERROR_U_USE_LIBRARY;
332332 }
@@ -387,9 +387,9 @@ int __stdcall Command
387387 piInfo.eStatus = TPI_STATUS_INPROCESS;
388388
389389 // ファイル出力には対応してないのでメモリ出力で代行。
390- HLOCAL hMemory = NULL;
390+ HLOCAL hMemory = nullptr;
391391 nErrorCode = ErrorCodeConvert(((int (PASCAL *)(const char *, long, char *, unsigned int, FARPROC, long)) fpProc)(_swInfo->szArcName.ToUTF8(), (long) piInfo.fiInfo.pCustomInfo, (char *) & hMemory, 0x0100, (FARPROC) CallbackProc, (long) & piInfo));
392- if (nErrorCode == TPI_ERROR_SUCCESS && hMemory == NULL)
392+ if (nErrorCode == TPI_ERROR_SUCCESS && hMemory == nullptr)
393393 {
394394 nErrorCode = TPI_ERROR_UNDEFINED;
395395 }
--- a/src/plugin/sqxArc/sqxArc.cpp
+++ b/src/plugin/sqxArc/sqxArc.cpp
@@ -141,7 +141,7 @@ int CALLBACK CallbackProc(void *, SQX_CALLBACKINFO * pCallbackInfo)
141141 piInfo.fiInfo.fnFileName = wxFileName(piInfo.fiInfo.szStoredName);
142142 piInfo.fnDestination = wxFileName(WC2String(pCallbackInfo->pszTargetFileName));
143143 return
144- g_prProc == NULL || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CANCEL ?
144+ g_prProc == nullptr || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CANCEL ?
145145 SQX_PROGRESS_OK : SQX_PROGRESS_CANCEL;
146146
147147 case SQX_CALLBACK_PROGRESS:
@@ -149,7 +149,7 @@ int CALLBACK CallbackProc(void *, SQX_CALLBACKINFO * pCallbackInfo)
149149 piInfo.eStatus = TPI_STATUS_INPROCESS;
150150 piInfo.nProcessedSize = pCallbackInfo->iProgress;
151151 return
152- g_prProc == NULL || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CANCEL ?
152+ g_prProc == nullptr || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CANCEL ?
153153 SQX_PROGRESS_OK : SQX_PROGRESS_CANCEL;
154154
155155 case SQX_CALLBACK_REPLACE:
@@ -163,7 +163,7 @@ int CALLBACK CallbackProc(void *, SQX_CALLBACKINFO * pCallbackInfo)
163163 piInfo.fiInfo.tmModify = FileTimeToWxDateTime(& pCallbackInfo->pFindDataReplace->ftLastWriteTime);
164164 piInfo.fiInfo.tmCreate = FileTimeToWxDateTime(& pCallbackInfo->pFindDataReplace->ftCreationTime);
165165 return
166- g_prProc == NULL ? SQX_REPLACE_OVERWRITE :
166+ g_prProc == nullptr ? SQX_REPLACE_OVERWRITE :
167167 g_prProc(TPI_NOTIFY_COMMON, & piInfo) == TPI_CALLBACK_CANCEL ? SQX_PROGRESS_CANCEL :
168168 piInfo.fnDestination.IsOk() ? SQX_REPLACE_OVERWRITE : SQX_REPLACE_SKIP;
169169
@@ -172,7 +172,7 @@ int CALLBACK CallbackProc(void *, SQX_CALLBACKINFO * pCallbackInfo)
172172 piInfo.eMessage = TPI_MESSAGE_ASK;
173173 piInfo.eStatus = TPI_PARAM_PASSWORD;
174174 piInfo.szParam.Empty();
175- if (g_prProc == NULL || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
175+ if (g_prProc == nullptr || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
176176 {
177177 return SQX_PASSWORD_CANCEL;
178178 }
@@ -186,7 +186,7 @@ int CALLBACK CallbackProc(void *, SQX_CALLBACKINFO * pCallbackInfo)
186186 piInfo.eMessage = TPI_MESSAGE_ASK;
187187 piInfo.eStatus = TPI_PARAM_NEXTVOLUME;
188188 piInfo.szParam.Empty();
189- if (g_prProc == NULL || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
189+ if (g_prProc == nullptr || g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)
190190 {
191191 return SQX_NEXTDISK_CANCEL;
192192 }
@@ -212,7 +212,7 @@ int CALLBACK CallbackProc(void *, SQX_CALLBACKINFO * pCallbackInfo)
212212 }
213213
214214 // コールバック関数に送信。
215- if (g_prProc != NULL)
215+ if (g_prProc != nullptr)
216216 {
217217 g_prProc(TPI_NOTIFY_COMMON, & piInfo);
218218 }
@@ -239,7 +239,7 @@ int __stdcall GetPluginInformation
239239 void * _pPtr
240240 )
241241 {
242- if (_pPtr == NULL)
242+ if (_pPtr == nullptr)
243243 {
244244 return TPI_ERROR_D_PARAMETER;
245245 }
@@ -304,13 +304,13 @@ int __stdcall LoadPlugin
304304 {
305305 ::RemoveCwdFromSearchPath();
306306 g_hLib = ::LoadLibrary(L"sqx20u.dll");
307- if (g_hLib == NULL)
307+ if (g_hLib == nullptr)
308308 {
309309 return TPI_ERROR_U_LOAD_LIBRARY;
310310 }
311311
312312 // コールバック関数を設定。
313- if (_prProc != NULL)
313+ if (_prProc != nullptr)
314314 {
315315 g_prProc = * _prProc;
316316 }
@@ -334,27 +334,27 @@ int __stdcall OpenArchive
334334 )
335335 {
336336 FARPROC fpProc = ::GetAPIAddress("InitArchive");
337- if (fpProc == NULL)
337+ if (fpProc == nullptr)
338338 {
339339 return TPI_ERROR_U_USE_LIBRARY;
340340 }
341341
342- int nErrorCode = ErrorCodeConvert(((int (__stdcall *)(const wchar_t *, SQXCALLBACK, void *, void **)) fpProc)(_szArcName.wchar_str(), CallbackProc, NULL, _hArchive));
342+ int nErrorCode = ErrorCodeConvert(((int (__stdcall *)(const wchar_t *, SQXCALLBACK, void *, void **)) fpProc)(_szArcName.wchar_str(), CallbackProc, nullptr, _hArchive));
343343 if (nErrorCode != TPI_ERROR_SUCCESS)
344344 {
345345 return nErrorCode;
346346 }
347347
348- if (_nFileCount != NULL)
348+ if (_nFileCount != nullptr)
349349 {
350350 fpProc = ::GetAPIAddress("InitArcFileList");
351- if (fpProc == NULL)
351+ if (fpProc == nullptr)
352352 {
353353 CloseArchive(* _hArchive);
354354 return TPI_ERROR_U_USE_LIBRARY;
355355 }
356356 SQX_ARCLIST * al = ((SQX_ARCLIST * (__stdcall *)(void *)) fpProc)(* _hArchive);
357- if (al == NULL)
357+ if (al == nullptr)
358358 {
359359 CloseArchive(* _hArchive);
360360 return TPI_ERROR_UNDEFINED;
@@ -362,7 +362,7 @@ int __stdcall OpenArchive
362362 * _nFileCount = al->dwItemCount;
363363
364364 fpProc = ::GetAPIAddress("DoneArcFileList");
365- if (fpProc == NULL)
365+ if (fpProc == nullptr)
366366 {
367367 CloseArchive(* _hArchive);
368368 return TPI_ERROR_U_USE_LIBRARY;
@@ -379,7 +379,7 @@ int __stdcall CloseArchive
379379 )
380380 {
381381 FARPROC fpProc = ::GetAPIAddress("DoneArchive");
382- if (fpProc == NULL || _hArchive == NULL)
382+ if (fpProc == nullptr || _hArchive == nullptr)
383383 {
384384 return TPI_ERROR_U_USE_LIBRARY;
385385 }
@@ -402,36 +402,36 @@ int __stdcall GetFileInformation
402402 {
403403 s_nFileId = 0;
404404 FARPROC fpProc = ::GetAPIAddress("InitArcFileList");
405- if (fpProc == NULL)
405+ if (fpProc == nullptr)
406406 {
407407 return TPI_ERROR_U_USE_LIBRARY;
408408 }
409409 al = ((SQX_ARCLIST * (__stdcall *)(void *)) fpProc)(_hArchive);
410- if (al == NULL)
410+ if (al == nullptr)
411411 {
412412 return TPI_ERROR_UNDEFINED;
413413 }
414414
415415 fpProc = ::GetAPIAddress("InitFileList");
416- if (fpProc == NULL)
416+ if (fpProc == nullptr)
417417 {
418418 return TPI_ERROR_U_USE_LIBRARY;
419419 }
420420 fl = ((void * (__stdcall *)(void *)) fpProc)(_hArchive);
421- if (fl == NULL)
421+ if (fl == nullptr)
422422 {
423423 return TPI_ERROR_UNDEFINED;
424424 }
425425
426426 fpProc = ::GetAPIAddress("AppendFileList");
427- if (fpProc == NULL)
427+ if (fpProc == nullptr)
428428 {
429429 return TPI_ERROR_U_USE_LIBRARY;
430430 }
431431 ((void (__stdcall *)(void *, void *, const wchar_t *)) fpProc)(_hArchive, fl, L"*");
432432
433433 fpProc = ::GetAPIAddress("ListFiles");
434- if (fpProc == NULL)
434+ if (fpProc == nullptr)
435435 {
436436 return TPI_ERROR_U_USE_LIBRARY;
437437 }
@@ -447,17 +447,17 @@ int __stdcall GetFileInformation
447447 aln = al->pHead;
448448 }
449449
450- if (aln == NULL)
450+ if (aln == nullptr)
451451 {
452452 FARPROC fpProc = ::GetAPIAddress("DoneArcFileList");
453- if (fpProc == NULL)
453+ if (fpProc == nullptr)
454454 {
455455 return TPI_ERROR_U_USE_LIBRARY;
456456 }
457457 ((void (__stdcall *)(void *, SQX_ARCLIST *)) fpProc)(_hArchive, al);
458458
459459 fpProc = ::GetAPIAddress("DoneFileList");
460- if (fpProc == NULL)
460+ if (fpProc == nullptr)
461461 {
462462 return TPI_ERROR_U_USE_LIBRARY;
463463 }
@@ -516,36 +516,36 @@ int __stdcall GetArchiveInformation
516516 )
517517 {
518518 FARPROC fpProc = ::GetAPIAddress("InitArcFileList");
519- if (fpProc == NULL)
519+ if (fpProc == nullptr)
520520 {
521521 return TPI_ERROR_U_USE_LIBRARY;
522522 }
523523 SQX_ARCLIST * al = ((SQX_ARCLIST * (__stdcall *)(void *)) fpProc)(_hArchive);
524- if (al == NULL)
524+ if (al == nullptr)
525525 {
526526 return TPI_ERROR_UNDEFINED;
527527 }
528528
529529 fpProc = ::GetAPIAddress("InitFileList");
530- if (fpProc == NULL)
530+ if (fpProc == nullptr)
531531 {
532532 return TPI_ERROR_U_USE_LIBRARY;
533533 }
534534 void * fl = ((void * (__stdcall *)(void *)) fpProc)(_hArchive);
535- if (fl == NULL)
535+ if (fl == nullptr)
536536 {
537537 return TPI_ERROR_UNDEFINED;
538538 }
539539
540540 fpProc = ::GetAPIAddress("AppendFileList");
541- if (fpProc == NULL)
541+ if (fpProc == nullptr)
542542 {
543543 return TPI_ERROR_U_USE_LIBRARY;
544544 }
545545 ((void (__stdcall *)(void *, void *, const wchar_t *)) fpProc)(_hArchive, fl, L"*");
546546
547547 fpProc = ::GetAPIAddress("ListFiles");
548- if (fpProc == NULL)
548+ if (fpProc == nullptr)
549549 {
550550 return TPI_ERROR_U_USE_LIBRARY;
551551 }
@@ -560,14 +560,14 @@ int __stdcall GetArchiveInformation
560560 }
561561
562562 fpProc = ::GetAPIAddress("DoneArcFileList");
563- if (fpProc == NULL)
563+ if (fpProc == nullptr)
564564 {
565565 return TPI_ERROR_U_USE_LIBRARY;
566566 }
567567 ((void (__stdcall *)(void *, SQX_ARCLIST *)) fpProc)(_hArchive, al);
568568
569569 fpProc = ::GetAPIAddress("DoneFileList");
570- if (fpProc == NULL)
570+ if (fpProc == nullptr)
571571 {
572572 return TPI_ERROR_U_USE_LIBRARY;
573573 }
@@ -585,7 +585,7 @@ int __stdcall GetArchiveInformation
585585 if (ai.fArchiveComment)
586586 {
587587 fpProc = ::GetAPIAddress("GetArchiveComment");
588- if (fpProc == NULL)
588+ if (fpProc == nullptr)
589589 {
590590 return TPI_ERROR_U_USE_LIBRARY;
591591 }
@@ -622,11 +622,11 @@ int __stdcall Command
622622 }
623623
624624 FARPROC fpProc;
625- void * fl = NULL;
625+ void * fl = nullptr;
626626 if (_eCommand != TPI_COMMAND_TEST && _eCommand != TPI_COMMAND_REPAIR)
627627 {
628628 fpProc = ::GetAPIAddress("InitFileList");
629- if (fpProc == NULL)
629+ if (fpProc == nullptr)
630630 {
631631 if (_eCommand == TPI_COMMAND_CREATE)
632632 {
@@ -635,7 +635,7 @@ int __stdcall Command
635635 return TPI_ERROR_U_USE_LIBRARY;
636636 }
637637 fl = ((void * (__stdcall *)(void *)) fpProc)(_hArchive);
638- if (fl == NULL)
638+ if (fl == nullptr)
639639 {
640640 if (_eCommand == TPI_COMMAND_CREATE)
641641 {
@@ -645,7 +645,7 @@ int __stdcall Command
645645 }
646646
647647 fpProc = ::GetAPIAddress("AppendFileList");
648- if (fpProc == NULL)
648+ if (fpProc == nullptr)
649649 {
650650 if (_eCommand == TPI_COMMAND_CREATE)
651651 {
@@ -666,8 +666,8 @@ int __stdcall Command
666666 _eCommand == TPI_COMMAND_EXTRACT ? ::GetAPIAddress("ExtractFiles") :
667667 _eCommand == TPI_COMMAND_DELETE ? ::GetAPIAddress("DeleteFiles") :
668668 _eCommand == TPI_COMMAND_TEST ? ::GetAPIAddress("TestArchive") :
669- _eCommand == TPI_COMMAND_REPAIR ? ::GetAPIAddress("RepairArchive") : NULL;
670- if (fpProc == NULL)
669+ _eCommand == TPI_COMMAND_REPAIR ? ::GetAPIAddress("RepairArchive") : nullptr;
670+ if (fpProc == nullptr)
671671 {
672672 if (_eCommand == TPI_COMMAND_CREATE)
673673 {
@@ -706,7 +706,7 @@ int __stdcall Command
706706 {
707707 wcsncpy(co.szPasswordHeader, _swInfo->szPassword.c_str(), sizeof(co.szPasswordHeader) / sizeof(wchar_t) - 1);
708708 }
709- nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, SQXCALLBACK, void *, void *, SQX_COMPRESSOPTIONS *)) fpProc)(_hArchive, CallbackProc, NULL, fl, & co));
709+ nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, SQXCALLBACK, void *, void *, SQX_COMPRESSOPTIONS *)) fpProc)(_hArchive, CallbackProc, nullptr, fl, & co));
710710 break;
711711 }
712712 case TPI_COMMAND_EXTRACT:
@@ -726,19 +726,19 @@ int __stdcall Command
726726 wcsncpy(eo.szPassword, _swInfo->szPassword.c_str(), sizeof(eo.szPassword) / sizeof(wchar_t) - 1);
727727 wcsncpy(eo.szPasswordHeader, _swInfo->szPassword.c_str(), sizeof(eo.szPasswordHeader) / sizeof(wchar_t) - 1);
728728 wcsncpy(eo.szOutputPath, _swInfo->fnDestinationDirectory.GetFullPath().c_str(), sizeof(eo.szOutputPath) / sizeof(wchar_t) - 1);
729- nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, SQXCALLBACK, void *, void *, SQX_EXTRACTOPTIONS *)) fpProc)(_hArchive, CallbackProc, NULL, fl, & eo));
729+ nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, SQXCALLBACK, void *, void *, SQX_EXTRACTOPTIONS *)) fpProc)(_hArchive, CallbackProc, nullptr, fl, & eo));
730730 break;
731731 }
732732 case TPI_COMMAND_DELETE:
733- nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, SQXCALLBACK, void *, void *)) fpProc)(_hArchive, CallbackProc, NULL, fl));
733+ nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, SQXCALLBACK, void *, void *)) fpProc)(_hArchive, CallbackProc, nullptr, fl));
734734 break;
735735 case TPI_COMMAND_TEST:
736- nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, SQXCALLBACK, void *)) fpProc)(_hArchive, CallbackProc, NULL));
736+ nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, SQXCALLBACK, void *)) fpProc)(_hArchive, CallbackProc, nullptr));
737737 break;
738738 case TPI_COMMAND_REPAIR:
739739 {
740740 wxString sz = _swInfo->szArcName + wxT("_repaired");
741- nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, const wchar_t *, SQX_ARCLIST *, SQX_ARCLIST *)) fpProc)(_hArchive, sz.c_str(), NULL, NULL));
741+ nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, const wchar_t *, SQX_ARCLIST *, SQX_ARCLIST *)) fpProc)(_hArchive, sz.c_str(), nullptr, nullptr));
742742 break;
743743 }
744744 }
@@ -755,7 +755,7 @@ int __stdcall Command
755755 if (_eCommand != TPI_COMMAND_TEST && _eCommand != TPI_COMMAND_REPAIR)
756756 {
757757 fpProc = ::GetAPIAddress("DoneFileList");
758- if (fpProc == NULL)
758+ if (fpProc == nullptr)
759759 {
760760 if (_eCommand == TPI_COMMAND_CREATE)
761761 {
--- a/src/plugin/sqxArc/sqxArc.vcxproj
+++ b/src/plugin/sqxArc/sqxArc.vcxproj
@@ -18,8 +18,8 @@
1818 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
1919 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
2020 <ConfigurationType>DynamicLibrary</ConfigurationType>
21- <PlatformToolset>v120</PlatformToolset>
2221 <CharacterSet>Unicode</CharacterSet>
22+ <PlatformToolset>v120</PlatformToolset>
2323 </PropertyGroup>
2424 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
2525 <ConfigurationType>DynamicLibrary</ConfigurationType>
--- a/src/plugin/xpiLibrary/xpiLibrary.cpp
+++ b/src/plugin/xpiLibrary/xpiLibrary.cpp
@@ -51,7 +51,7 @@ int __stdcall CallbackProc(int _nNow, int _nMax, long _lData)
5151 piInfo->fiInfo.nUnpackedSize = _nMax;
5252
5353 // コールバック関数に送信。
54- return g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, piInfo) == TPI_CALLBACK_CANCEL;
54+ return g_prProc != nullptr && g_prProc(TPI_NOTIFY_COMMON, piInfo) == TPI_CALLBACK_CANCEL;
5555 }
5656
5757 //******************************************************************************
@@ -94,7 +94,7 @@ int __stdcall GetPluginInformation
9494 void * _pPtr
9595 )
9696 {
97- if (_pPtr == NULL)
97+ if (_pPtr == nullptr)
9898 {
9999 return TPI_ERROR_D_PARAMETER;
100100 }
@@ -160,15 +160,15 @@ int __stdcall LoadPlugin
160160 {
161161 // SPIをロード。
162162 g_hLib = ::LoadLibrary((g_szLibPath + szSPIName).wchar_str());
163- if (g_hLib == NULL)
163+ if (g_hLib == nullptr)
164164 {
165165 continue;
166166 }
167167
168168 // GetPluginInfoを実行。
169169 FARPROC fpProc = ::GetProcAddress(g_hLib, "GetPluginInfo");
170- char szPluginType[5]; // 種類4bytes + NULL
171- if (fpProc == NULL
170+ char szPluginType[5]; // 種類4bytes + nullptr
171+ if (fpProc == nullptr
172172 || ((int (PASCAL *)(int, char *, int)) fpProc)(0, szPluginType, sizeof(szPluginType)) <= 0
173173 || szPluginType[2] != 'I' || szPluginType[3] != 'N')
174174 {
@@ -178,7 +178,7 @@ int __stdcall LoadPlugin
178178
179179 // 書庫に対応しているかチェック。
180180 fpProc = ::GetProcAddress(g_hLib, "IsSupported");
181- if (fpProc == NULL)
181+ if (fpProc == nullptr)
182182 {
183183 ::FreeLibrary(g_hLib);
184184 continue;
@@ -187,7 +187,7 @@ int __stdcall LoadPlugin
187187 if (((BOOL (PASCAL *)(const char *, unsigned long)) fpProc)(_szArcName.ToUTF8(), (unsigned long) buffer))
188188 {
189189 // コールバック関数を設定。
190- if (_prProc != NULL)
190+ if (_prProc != nullptr)
191191 {
192192 g_prProc = * _prProc;
193193 }
@@ -244,7 +244,7 @@ int __stdcall GetFileInformation
244244
245245 // 画像の情報を取得。
246246 FARPROC fpProc = ::GetProcAddress(g_hLib, "GetPictureInfo");
247- if (fpProc == NULL)
247+ if (fpProc == nullptr)
248248 {
249249 return TPI_ERROR_U_USE_LIBRARY;
250250 }
@@ -265,7 +265,7 @@ int __stdcall GetFileInformation
265265 {
266266 // XPIをロード。
267267 HMODULE hXPI = ::LoadLibrary((g_szLibPath + szXPIName).wchar_str());
268- if (hXPI == NULL)
268+ if (hXPI == nullptr)
269269 {
270270 continue;
271271 }
@@ -274,7 +274,7 @@ int __stdcall GetFileInformation
274274 FARPROC fpProc = ::GetProcAddress(hXPI, "GetPluginInfo");
275275 char szTemp[513];
276276 memset(szTemp, 0, sizeof(szTemp));
277- if (fpProc == NULL
277+ if (fpProc == nullptr
278278 || ((int (PASCAL *)(int, char *, int)) fpProc)(0, szTemp, sizeof(szTemp) - 1) <= 0
279279 || szTemp[2] != 'X' || szTemp[3] != 'N')
280280 {
@@ -297,7 +297,7 @@ int __stdcall GetFileInformation
297297
298298 // 対応確認。
299299 fpProc = ::GetProcAddress(hXPI, "IsSupported");
300- if (fpProc == NULL || ! ((BOOL (PASCAL *)(int)) fpProc)(nColorDepth))
300+ if (fpProc == nullptr || ! ((BOOL (PASCAL *)(int)) fpProc)(nColorDepth))
301301 {
302302 ::FreeLibrary(hXPI);
303303 continue;
@@ -317,7 +317,7 @@ int __stdcall GetArchiveInformation
317317 {
318318 // 画像の情報を取得。
319319 FARPROC fpProc = ::GetProcAddress(g_hLib, "GetPictureInfo");
320- if (fpProc == NULL)
320+ if (fpProc == nullptr)
321321 {
322322 return TPI_ERROR_U_USE_LIBRARY;
323323 }
@@ -333,7 +333,7 @@ int __stdcall GetArchiveInformation
333333
334334 // GetPluginInfoを実行。
335335 fpProc = ::GetProcAddress(g_hLib, "GetPluginInfo");
336- if (fpProc != NULL)
336+ if (fpProc != nullptr)
337337 {
338338 char szTemp[513];
339339 memset(szTemp, 0, sizeof(szTemp));
@@ -372,7 +372,7 @@ int __stdcall Command
372372
373373 // 画像の情報を取得。
374374 FARPROC fpProc = ::GetProcAddress(g_hLib, "GetPictureInfo");
375- if (fpProc == NULL)
375+ if (fpProc == nullptr)
376376 {
377377 return TPI_ERROR_U_USE_LIBRARY;
378378 }
@@ -397,12 +397,12 @@ int __stdcall Command
397397 // メモリ上に展開。
398398 HANDLE hInfo, hMemory;
399399 fpProc = ::GetProcAddress(g_hLib, "GetPicture");
400- if (fpProc == NULL)
400+ if (fpProc == nullptr)
401401 {
402402 return TPI_ERROR_U_USE_LIBRARY;
403403 }
404404 nErrorCode = ErrorCodeConvert(((int (PASCAL *)(const char *, long, unsigned int, HANDLE *, HANDLE *, FARPROC, long)) fpProc)(_swInfo->szArcName.ToUTF8(), 0, 0, & hInfo, & hMemory, (FARPROC) CallbackProc, (long) & piInfo));
405- if (nErrorCode == TPI_ERROR_SUCCESS && (hMemory == NULL || hInfo == NULL))
405+ if (nErrorCode == TPI_ERROR_SUCCESS && (hMemory == nullptr || hInfo == nullptr))
406406 {
407407 return TPI_ERROR_UNDEFINED;
408408 }
@@ -431,7 +431,7 @@ int __stdcall Command
431431
432432 // XPIをロード。
433433 HMODULE hXPI = ::LoadLibrary((g_szLibPath + piInfo.fiInfo.fnFileName.GetPath()).wchar_str());
434- if (hXPI == NULL)
434+ if (hXPI == nullptr)
435435 {
436436 nErrorCode = TPI_ERROR_U_USE_LIBRARY;
437437 break;
@@ -440,7 +440,7 @@ int __stdcall Command
440440 // GetPluginInfoを実行。
441441 FARPROC fpProc = ::GetProcAddress(hXPI, "GetPluginInfo");
442442 char szTemp[20];
443- if (fpProc == NULL
443+ if (fpProc == nullptr
444444 || ((int (PASCAL *)(int, char *, int)) fpProc)(2, szTemp, sizeof(szTemp)) <= 0)
445445 {
446446 ::FreeLibrary(hXPI);
@@ -461,7 +461,7 @@ int __stdcall Command
461461 // 書き込み。
462462 piInfo.eStatus = TPI_STATUS_INPROCESS;
463463 fpProc = ::GetProcAddress(hXPI, "CreatePicture");
464- if (fpProc == NULL)
464+ if (fpProc == nullptr)
465465 {
466466 ::FreeLibrary(hXPI);
467467 nErrorCode = TPI_ERROR_U_USE_LIBRARY;
旧リポジトリブラウザで表示