summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-21 22:50:50 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-21 22:50:50 +0000
commit15fa9a8a6dbce8619118c9f0cea877fbf903700a (patch)
treee63fd66f3332fa62103a7a71fc043a11b3b5f1fe /protocols/FacebookRM
parentc4645924a1a945ddf1c02c60450b8b9ca0363c65 (diff)
explicit constructors for ptrT
git-svn-id: http://svn.miranda-ng.org/main/trunk@6174 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/src/contacts.cpp6
-rw-r--r--protocols/FacebookRM/src/dialogs.cpp4
-rw-r--r--protocols/FacebookRM/src/process.cpp16
-rw-r--r--protocols/FacebookRM/src/proto.cpp8
4 files changed, 17 insertions, 17 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index cdb71054ac..dddc83e4ff 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -86,7 +86,7 @@ HANDLE FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, boo
db_unset(hContact, "CList", "MyHandle");
- ptrT group = getTStringA(NULL, FACEBOOK_KEY_DEF_GROUP);
+ ptrT group( getTStringA(NULL, FACEBOOK_KEY_DEF_GROUP));
if (group)
db_set_ts(hContact, "CList", "Group", group);
@@ -122,7 +122,7 @@ void FacebookProto::SetAllContactStatuses(int status, bool reset_client)
continue;
if (reset_client) {
- ptrT mirver = getTStringA(hContact, "MirVer");
+ ptrT mirver( getTStringA(hContact, "MirVer"));
if (!mirver || _tcscmp(mirver, _T(FACEBOOK_NAME)))
setTString(hContact, "MirVer", _T(FACEBOOK_NAME));
@@ -317,7 +317,7 @@ void FacebookProto::SendPokeWorker(void *p)
utils::text::slashu_to_utf8(
utils::text::source_get_value(&resp.data, 3, "\"body\":", "__html\":\"", "\"}"))));
- ptrT tmessage = mir_utf8decodeT(message.c_str());
+ ptrT tmessage( mir_utf8decodeT(message.c_str()));
NotifyEvent(m_tszUserName, tmessage, NULL, FACEBOOK_EVENT_OTHER);
}
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp
index b2181d8aa9..9f545181af 100644
--- a/protocols/FacebookRM/src/dialogs.cpp
+++ b/protocols/FacebookRM/src/dialogs.cpp
@@ -198,7 +198,7 @@ INT_PTR CALLBACK FBMindProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpara
SendDlgItemMessage(hwnd, IDC_MINDMSG, EM_LIMITTEXT, FACEBOOK_MIND_LIMIT, 0);
SendDlgItemMessage(hwnd, IDC_URL, EM_LIMITTEXT, 1024, 0);
- ptrT place = data->proto->getTStringA(FACEBOOK_KEY_PLACE);
+ ptrT place( data->proto->getTStringA(FACEBOOK_KEY_PLACE));
SetDlgItemText(hwnd, IDC_PLACE, place != NULL ? place : _T("Miranda NG"));
bShowContacts = data->proto->getByte("PostStatusExpand", 0) > 0;
@@ -307,7 +307,7 @@ INT_PTR CALLBACK FBMindProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpara
HWND hwndList = GetDlgItem(hwnd, IDC_CCLIST);
GetSelectedContacts(data->proto, NULL, hwndList, &status->users);
- ptrA narrow = mir_utf8encodeT(mindMessageT);
+ ptrA narrow( mir_utf8encodeT(mindMessageT));
status->text = narrow;
if (status->user_id == data->proto->facy.self_.user_id && data->proto->last_status_msg_ != (char *)narrow)
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 218f95125a..edb554f9f8 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -806,11 +806,11 @@ void FacebookProto::SearchAckThread(void *targ)
if (id.empty() || id == facy.self_.user_id)
continue;
- ptrT tid = mir_utf8decodeT(id.c_str());
- ptrT tname = mir_utf8decodeT(utils::text::special_expressions_decode(name).c_str());
- ptrT tsurname = mir_utf8decodeT(utils::text::special_expressions_decode(surname).c_str());
- ptrT tnick = mir_utf8decodeT(utils::text::special_expressions_decode(nick).c_str());
- ptrT tcommon = mir_utf8decodeT(utils::text::special_expressions_decode(common).c_str());
+ ptrT tid( mir_utf8decodeT(id.c_str()));
+ ptrT tname( mir_utf8decodeT(utils::text::special_expressions_decode(name).c_str()));
+ ptrT tsurname( mir_utf8decodeT(utils::text::special_expressions_decode(surname).c_str()));
+ ptrT tnick( mir_utf8decodeT(utils::text::special_expressions_decode(nick).c_str()));
+ ptrT tcommon( mir_utf8decodeT(utils::text::special_expressions_decode(common).c_str()));
PROTOSEARCHRESULT isr = {0};
isr.cbSize = sizeof(isr);
@@ -874,9 +874,9 @@ void FacebookProto::SearchIdAckThread(void *targ)
// ignore self contact and empty ids
if (!id.empty() && id != facy.self_.user_id){
- ptrT tid = mir_utf8decodeT(id.c_str());
- ptrT tname = mir_utf8decodeT(name.c_str());
- ptrT tsurname = mir_utf8decodeT(surname.c_str());
+ ptrT tid( mir_utf8decodeT(id.c_str()));
+ ptrT tname( mir_utf8decodeT(name.c_str()));
+ ptrT tsurname( mir_utf8decodeT(surname.c_str()));
PROTOSEARCHRESULT isr = {0};
isr.cbSize = sizeof(isr);
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 7a508dfe29..bd2dd4e071 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -241,9 +241,9 @@ HANDLE FacebookProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* first
HANDLE FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
- ptrA id = mir_t2a_cp(psr->id, CP_UTF8);
- ptrA name = mir_t2a_cp(psr->firstName, CP_UTF8);
- ptrA surname = mir_t2a_cp(psr->lastName, CP_UTF8);
+ ptrA id( mir_t2a_cp(psr->id, CP_UTF8));
+ ptrA name( mir_t2a_cp(psr->firstName, CP_UTF8));
+ ptrA surname( mir_t2a_cp(psr->lastName, CP_UTF8));
if (id == NULL)
return NULL;
@@ -683,7 +683,7 @@ void FacebookProto::OpenUrl(std::string url)
url = (useHttps ? HTTP_PROTO_SECURE : HTTP_PROTO_REGULAR) + facy.get_server_type() + url;
}
- ptrT data = mir_utf8decodeT(url.c_str());
+ ptrT data( mir_utf8decodeT(url.c_str()));
CallService(MS_UTILS_OPENURL, (WPARAM)OUF_TCHAR, (LPARAM)data);
}