summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/process.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-05-31 09:54:49 +0000
committerRobert Pösel <robyer@seznam.cz>2014-05-31 09:54:49 +0000
commit908e2498da725561fe9b3eb47f0f5f6e95bbb8ac (patch)
treece8a9673e07d30d30b4c1cdcde1b8c8357fb5269 /protocols/FacebookRM/src/process.cpp
parent21290b61b2e1f608d046ba9be0a1dd8b7132ce46 (diff)
Facebook: !length() -> empty()
git-svn-id: http://svn.miranda-ng.org/main/trunk@9375 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/process.cpp')
-rw-r--r--protocols/FacebookRM/src/process.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 65175c263e..1181b326ee 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -284,7 +284,7 @@ void FacebookProto::ProcessUnreadMessages(void*)
data += "&folders[1]=other";
data += "&client=mercury";
data += "__user=" + facy.self_.user_id;
- data += "&fb_dtsg=" + (facy.dtsg_.length() ? facy.dtsg_ : "0");
+ data += "&fb_dtsg=" + (!facy.dtsg_.empty() ? facy.dtsg_ : "0");
data += "&__a=1&__dyn=&__req=&ttstamp=0";
http::response resp = facy.flap(REQUEST_UNREAD_THREADS, &data);
@@ -338,7 +338,7 @@ void FacebookProto::ProcessUnreadMessage(void *p)
while (!threads.empty()) {
std::string data = "client=mercury";
data += "&__user=" + facy.self_.user_id;
- data += "&fb_dtsg=" + (facy.dtsg_.length() ? facy.dtsg_ : "0");
+ data += "&fb_dtsg=" + (!facy.dtsg_.empty() ? facy.dtsg_ : "0");
data += "&__a=1&__dyn=&__req=&ttstamp=0";
for (std::vector<std::string>::size_type i = 0; i < threads.size(); i++) {
@@ -431,7 +431,7 @@ void FacebookProto::LoadLastMessages(void *p)
std::string data = "client=mercury";
data += "&__user=" + facy.self_.user_id;
- data += "&fb_dtsg=" + (facy.dtsg_.length() ? facy.dtsg_ : "0");
+ data += "&fb_dtsg=" + (!facy.dtsg_.empty() ? facy.dtsg_ : "0");
data += "&__a=1&__dyn=&__req=&ttstamp=0";
bool isChat = isChatRoom(hContact);
@@ -799,7 +799,7 @@ void FacebookProto::ProcessFriendRequests(void*)
fbu->real_name = utils::text::source_get_value(&req, 2, "class=\"actor\">", "</");
fbu->user_id = utils::text::source_get_value(&get, 2, "id=", "&");
- if (fbu->user_id.length() && fbu->real_name.length())
+ if (!fbu->user_id.empty() && !fbu->real_name.empty())
{
MCONTACT hContact = AddToContactList(fbu, CONTACT_APPROVE);
setByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, CONTACT_APPROVE);
@@ -980,7 +980,7 @@ void FacebookProto::ProcessFeeds(void* data)
utils::text::remove_html(
utils::text::edit_html(post_message))));
- if (filtered || !nf->title.length() || !nf->text.length()) {
+ if (filtered || nf->title.empty() || nf->text.empty()) {
debugLogA(" \\ Newsfeed (time: %d) is filtered: %s", ttime, filtered ? "advertisement" : (nf->title.empty() ? "title empty" : "text empty"));
delete nf;
continue;