From 1db4b29d772702e85571b12172f9e3f86bf095b0 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 15 Aug 2015 10:12:35 +0000 Subject: Tox: added search by toxme.io git-svn-id: http://svn.miranda-ng.org/main/trunk@14957 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_core.cpp | 4 ++-- protocols/Tox/src/tox_search.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/Tox/src') diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp index 51e7ac70d8..fc5527adec 100644 --- a/protocols/Tox/src/tox_core.cpp +++ b/protocols/Tox/src/tox_core.cpp @@ -77,11 +77,11 @@ bool CToxProto::InitToxCore() uint8_t nick[TOX_MAX_NAME_LENGTH] = { 0 }; tox_self_get_name(tox, nick); - setWString("Nick", ptrW(Utf8DecodeW((char*)nick))); + setTString("Nick", ptrT(Utf8DecodeT((char*)nick))); uint8_t statusMessage[TOX_MAX_STATUS_MESSAGE_LENGTH] = { 0 }; tox_self_get_status_message(tox, statusMessage); - setWString("StatusMsg", ptrW(Utf8DecodeW((char*)statusMessage))); + setTString("StatusMsg", ptrT(Utf8DecodeT((char*)statusMessage))); return true; } diff --git a/protocols/Tox/src/tox_search.cpp b/protocols/Tox/src/tox_search.cpp index 8ee770e6e5..eee0c009d4 100644 --- a/protocols/Tox/src/tox_search.cpp +++ b/protocols/Tox/src/tox_search.cpp @@ -6,7 +6,7 @@ ToxHexAddress ResolveToxAddressFromDnsRecordV1(const std::string &dnsRecord) std::regex regex("^v=tox1;id=([A-Fa-f0-9]{76})(;sign=(\\S+))?$"); if (std::regex_search(dnsRecord, match, regex)) { - return match[1]; + return ToxHexAddress(match[1]); } return ToxHexAddress::Empty(); } @@ -186,7 +186,7 @@ HWND CToxProto::OnSearchAdvanced(HWND owner) TCHAR text[MAX_PATH]; GetDlgItemText(owner, IDC_SEARCH, text, _countof(text)); - const std::string query = T2Utf(text); + const std::string query = T2Utf(text).str(); if (std::regex_search(query, match, regex)) { std::string address = match[1]; -- cgit v1.2.3