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/Tox/src/tox_search.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/Tox/src/tox_search.cpp')
-rw-r--r-- | protocols/Tox/src/tox_search.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Tox/src/tox_search.cpp b/protocols/Tox/src/tox_search.cpp index 81724f482f..d03d3a091a 100644 --- a/protocols/Tox/src/tox_search.cpp +++ b/protocols/Tox/src/tox_search.cpp @@ -38,8 +38,8 @@ ToxHexAddress ResolveToxAddressFromDns(const char *dnsQuery) {
ToxHexAddress address = ToxHexAddress::Empty();
- DNS_RECORDA *record = NULL;
- DNS_STATUS status = DnsQuery_A(dnsQuery, DNS_TYPE_TEXT, DNS_QUERY_STANDARD, NULL, (PDNS_RECORD*)&record, NULL);
+ DNS_RECORDA *record = nullptr;
+ DNS_STATUS status = DnsQuery_A(dnsQuery, DNS_TYPE_TEXT, DNS_QUERY_STANDARD, nullptr, (PDNS_RECORD*)&record, nullptr);
while (status == ERROR_SUCCESS && record) {
DNS_TXT_DATAA *txt = &record->Data.Txt;
if (record->wType == DNS_TYPE_TEXT && txt->dwStringCount) {
@@ -210,7 +210,7 @@ HWND CToxProto::OnSearchAdvanced(HWND owner) {
if (!IsOnline()) {
// we cannot add someone to friend list while tox is offline
- return NULL;
+ return nullptr;
}
std::smatch match;
@@ -233,14 +233,14 @@ HWND CToxProto::OnSearchAdvanced(HWND owner) CallService(MS_ADDCONTACT_SHOW, (WPARAM)owner, (LPARAM)&acs);
- ForkThread(&CToxProto::SearchFailedAsync, NULL);
+ ForkThread(&CToxProto::SearchFailedAsync, nullptr);
}
else {
regex = "^\\s*(([^ @/:;()\"']+)(@[A-Za-z]+.[A-Za-z]{2,6})?)\\s*$";
if (std::regex_search(query, match, regex))
ForkThread(&CToxProto::SearchByNameAsync, mir_strdup(query.c_str()));
else
- ForkThread(&CToxProto::SearchFailedAsync, NULL);
+ ForkThread(&CToxProto::SearchFailedAsync, nullptr);
}
return (HWND)1;
}
|