From: GreyMerlin Date: Mon, 24 Dec 2018 23:26:19 +0000 (-0800) Subject: Additional low-level cleanups (3) X-Git-Tag: 2.16.4+-jp-10~110^2~183 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0b09078bb54204599bae89d08b24ab03d481912c;p=winmerge-jp%2Fwinmerge-jp.git Additional low-level cleanups (3) --- diff --git a/Externals/crystaledit/editlib/ccrystaleditview.cpp b/Externals/crystaledit/editlib/ccrystaleditview.cpp index bebcd4d55..db4c035f6 100644 --- a/Externals/crystaledit/editlib/ccrystaleditview.cpp +++ b/Externals/crystaledit/editlib/ccrystaleditview.cpp @@ -1664,7 +1664,7 @@ ReplaceSelection (LPCTSTR pszNewText, size_t cchNewText, DWORD dwFlags) if (m_pszMatched && !RxReplace(pszNewText, m_pszMatched, m_nLastFindWhatLen, m_rxmatch, &lpszNewStr, &m_nLastReplaceLen)) { CString text; - if (lpszNewStr && m_nLastReplaceLen > 0) + if (lpszNewStr != nullptr && m_nLastReplaceLen > 0) { LPTSTR buf = text.GetBuffer (m_nLastReplaceLen + 1); _tcsncpy_s (buf, m_nLastReplaceLen+1, lpszNewStr, m_nLastReplaceLen); diff --git a/Externals/crystaledit/editlib/memcombo.cpp b/Externals/crystaledit/editlib/memcombo.cpp index c2199d59d..121367193 100644 --- a/Externals/crystaledit/editlib/memcombo.cpp +++ b/Externals/crystaledit/editlib/memcombo.cpp @@ -90,7 +90,7 @@ void SetComboBoxWidth(CComboBox &Control, LPCTSTR lpszText = nullptr) _tcscpy_s(info.lfMenuFont.lfFaceName, _T("MS Sans Serif")); oFont.CreateFontIndirect(&info.lfMenuFont); oldFont = dc.SelectObject(&oFont); - if(lpszText && *lpszText) { + if(lpszText != nullptr && *lpszText != 0) { size = dc.GetTextExtent(lpszText); width = size.cx; } else { diff --git a/Src/FileOrFolderSelect.cpp b/Src/FileOrFolderSelect.cpp index 93299e284..a7befe416 100644 --- a/Src/FileOrFolderSelect.cpp +++ b/Src/FileOrFolderSelect.cpp @@ -176,7 +176,7 @@ static int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, // Look for BFFM_INITIALIZED if (uMsg == BFFM_INITIALIZED) { - if (lpData) + if (lpData != NULL) SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData); else SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)LastSelectedFolder.c_str()); diff --git a/Src/LocationBar.h b/Src/LocationBar.h index 450906bf6..9e79e8027 100644 --- a/Src/LocationBar.h +++ b/Src/LocationBar.h @@ -26,7 +26,7 @@ public: virtual ~CLocationBar(); virtual BOOL Create( CWnd* pParentWnd, // mandatory - LPCTSTR lpszWindowName = NULL, + LPCTSTR lpszWindowName = nullptr, DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP, UINT nID = AFX_IDW_PANE_FIRST);