From fba57c10d9f9552c9c31c20283147348789ef650 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 4 Jan 2014 19:26:46 +0000 Subject: some code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@7499 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/json.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'protocols/FacebookRM/src/json.cpp') diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 9abb95c088..4611d3119b 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -515,7 +515,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa } } - HANDLE hChatContact; + HANDLE hChatContact = NULL; // RM TODO: better use check if chatroom exists/is in db/is online... no? /// e.g. HANDLE hChatContact = proto->ChatIDToHContact(thread_id); ? @@ -593,7 +593,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa if (time_ == NULL) continue; JSONNODE *time = json_get(time_, "time"); - if (time == NULL || text == NULL || url == NULL || alert_id == NULL || time == NULL) + if (time == NULL || text == NULL || url == NULL || alert_id == NULL) continue; unsigned __int64 timestamp = json_as_float(time); @@ -659,7 +659,6 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa JSONNODE *time_ = json_get(it, "actor"); JSONNODE *story_ = json_get(it, "story_xhp"); - std::string id = json_as_pstring(actor_); time_t time = json_as_float(time_); std::string text = json_as_pstring(story_); text = utils::text::slashu_to_utf8(text); @@ -711,7 +710,6 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa JSONNODE *alert_ids = json_get(it, "alert_ids"); for (unsigned int n = 0; n < json_size(alert_ids); n++) { JSONNODE *idItr = json_at(alert_ids, n); - std::string alert_id = json_as_pstring(idItr); // PUDeletePopup(hWndPopup); } -- cgit v1.2.3