diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-23 18:47:26 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-23 18:47:26 +0000 |
commit | 7003bcdcc1263afd99f3d3ec9187e8ebea39326f (patch) | |
tree | a010923f9436d7b5aab11d6357cdf7fb27c7cc17 /protocols | |
parent | 362fb43aef57a79f9c5efac958e691e5f069a4b8 (diff) |
SkypeWeb: Cleanup.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13059 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/SkypeWeb/src/skype_history_sync.cpp | 9 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index 14bbf4baae..4825c70507 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -114,7 +114,6 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) if (!mir_strcmpi(type, "ended")) iType = 0;
else if (!mir_strcmpi(type, "started")) iType = 1;
-
HXML xmlNode = xi.getChildByPath(xml, _T("part"), 0);
HXML duration = xmlNode == NULL ? NULL : xi.getChildByPath(xmlNode, _T("duration"), 0);
iDuration = duration != NULL ? atoi(mir_t2a(xi.getText(duration))) : NULL;
@@ -135,11 +134,11 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) sec = iDuration % 60;
}
else
- hours=mins=sec=0;
+ hours = mins = sec = 0;
- if (hours < 10) chours.AppendFormat("0%d", hours); else chours.AppendFormat("%d", hours);
- if (mins < 10) cmins.AppendFormat("0%d", mins); else cmins.AppendFormat("%d", mins);
- if (sec < 10) csec.AppendFormat("0%d", sec); else csec.AppendFormat("%d", sec);
+ chours.AppendFormat(hours < 10 ? "0%d" : "%d", hours);
+ cmins.AppendFormat(mins < 10 ? "0%d" : "%d", mins);
+ csec.AppendFormat(sec < 10 ? "0%d" : "%d", sec);
text.AppendFormat("%s\n%s: %s:%s:%s", Translate("Call ended"), Translate("Duration"), chours, cmins, csec);
}
AddMessageToDb(hContact, timestamp, flags, clientMsgId, text.GetBuffer());
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 2bbb3bbe22..09cf9a1cea 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -303,11 +303,11 @@ void CSkypeProto::OnPrivateMessageEvent(JSONNODE *node) sec = iDuration % 60;
}
else
- hours=mins=sec=0;
+ hours = mins = sec = 0;
- if (hours < 10) chours.AppendFormat("0%d", hours); else chours.AppendFormat("%d", hours);
- if (mins < 10) cmins.AppendFormat("0%d", mins); else cmins.AppendFormat("%d", mins);
- if (sec < 10) csec.AppendFormat("0%d", sec); else csec.AppendFormat("%d", sec);
+ chours.AppendFormat(hours < 10 ? "0%d" : "%d", hours);
+ cmins.AppendFormat(mins < 10 ? "0%d" : "%d", mins);
+ csec.AppendFormat(sec < 10 ? "0%d" : "%d", sec);
text.AppendFormat("%s\n%s: %s:%s:%s", Translate("Call ended"), Translate("Duration"), chours, cmins, csec);
}
if (IsMe(from))
|