diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /protocols/JabberG/src/jabber_search.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/JabberG/src/jabber_search.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_search.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index 996018d1a8..d298054cc2 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -105,8 +105,8 @@ static int JabberSearchAddField(HWND hwndDlg, Data* FieldDat) int Order = (FieldDat->bHidden) ? -1 : FieldDat->Order; - HWND hwndLabel = CreateWindowEx(0, L"STATIC", (LPCTSTR)TranslateW(FieldDat->Label), WS_CHILD, CornerX, CornerY + Order * 40, width, 13, hwndParent, nullptr, hInst, 0); - HWND hwndVar = CreateWindowEx(0 | WS_EX_CLIENTEDGE, L"EDIT", (LPCTSTR)FieldDat->defValue, WS_CHILD | WS_TABSTOP, CornerX + 5, CornerY + Order * 40 + 14, width, 20, hwndParent, nullptr, hInst, 0); + HWND hwndLabel = CreateWindowEx(0, L"STATIC", (LPCTSTR)TranslateW(FieldDat->Label), WS_CHILD, CornerX, CornerY + Order * 40, width, 13, hwndParent, nullptr, hInst, nullptr); + HWND hwndVar = CreateWindowEx(0 | WS_EX_CLIENTEDGE, L"EDIT", (LPCTSTR)FieldDat->defValue, WS_CHILD | WS_TABSTOP, CornerX + 5, CornerY + Order * 40 + 14, width, 20, hwndParent, nullptr, hInst, nullptr); SendMessage(hwndLabel, WM_SETFONT, (WPARAM)hFont, 0); SendMessage(hwndVar, WM_SETFONT, (WPARAM)hFont, 0); if (!FieldDat->bHidden) { @@ -719,7 +719,7 @@ HWND __cdecl CJabberProto::CreateExtendedSearchUI(HWND parent) return CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SEARCHUSER), parent, JabberSearchAdvancedDlgProc, (LPARAM)this); } - return 0; // Failure + return nullptr; // Failure } ////////////////////////////////////////////////////////////////////////// @@ -728,15 +728,15 @@ HWND __cdecl CJabberProto::CreateExtendedSearchUI(HWND parent) HWND __cdecl CJabberProto::SearchAdvanced(HWND hwndDlg) { if (!m_bJabberOnline || !hwndDlg) - return 0; //error + return nullptr; //error JabberSearchData * dat = (JabberSearchData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); if (!dat) - return 0; //error + return nullptr; //error // check if server connected (at least one field exists) if (dat->nJSInfCount == 0) - return 0; + return nullptr; // formating request BOOL fRequestNotEmpty = FALSE; @@ -776,5 +776,5 @@ HWND __cdecl CJabberProto::SearchAdvanced(HWND hwndDlg) m_ThreadInfo->send(iq); return (HWND)pInfo->GetIqId(); } - return 0; + return nullptr; } |