summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-26 12:42:38 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-26 12:42:38 +0300
commitf05405db4308a5c419f15a3c9538e4c11e6c172a (patch)
tree4fa55475b428dcf5f26c27f4542b74a0572b6086
parentac6daf28ff621f1bd304fb061fca7b8254c929f4 (diff)
code cleaning
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp2
-rw-r--r--protocols/NewsAggregator/Src/CheckFeed.cpp2
-rw-r--r--protocols/Steam/src/steam_contacts.cpp2
-rw-r--r--protocols/Steam/src/steam_history.cpp2
-rw-r--r--protocols/Tox/src/tox_messages.cpp2
-rw-r--r--protocols/Twitter/src/connection.cpp2
-rw-r--r--protocols/VKontakte/src/vk_history.cpp2
8 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index b57a06fe19..67c00622d1 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -822,7 +822,7 @@ retry:
}
// Check if not empty message ( who needs it? )
else if (!e->event.msg.recipients_count && e->event.msg.message && *e->event.msg.message && mir_strcmp(e->event.msg.message, "\xA0\0")) {
- PROTORECVEVENT pre = { 0 };
+ PROTORECVEVENT pre = {};
time_t t = time(0);
pre.timestamp = (!(e->event.msg.msgclass & GG_CLASS_OFFLINE) || e->event.msg.time > (t - timeDeviation)) ? t : e->event.msg.time;
pre.szMessage = e->event.msg.message;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index 00bb85647b..595151e1ed 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -866,7 +866,7 @@ int GaduProto::img_displayasmsg(MCONTACT hContact, void *img)
mir_snwprintf(image_msg, L"[img]%s[/img]", szPath);
T2Utf szMessage(image_msg);
- PROTORECVEVENT pre = { 0 };
+ PROTORECVEVENT pre = {};
pre.timestamp = time(0);
pre.szMessage = szMessage;
ProtoChainRecvMsg(hContact, &pre);
diff --git a/protocols/NewsAggregator/Src/CheckFeed.cpp b/protocols/NewsAggregator/Src/CheckFeed.cpp
index 81413749b9..a8af908e0d 100644
--- a/protocols/NewsAggregator/Src/CheckFeed.cpp
+++ b/protocols/NewsAggregator/Src/CheckFeed.cpp
@@ -187,7 +187,7 @@ static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStr
T2Utf pszMessage(message);
- PROTORECVEVENT recv = { 0 };
+ PROTORECVEVENT recv = {};
recv.timestamp = (uint32_t)stamp;
recv.szMessage = pszMessage;
ProtoChainRecvMsg(hContact, &recv);
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index 7f7979e825..a007840c3b 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -308,7 +308,7 @@ void CSteamProto::ContactIsAskingAuth(MCONTACT hContact)
DB::AUTH_BLOB blob(hContact, nickName, firstName, lastName, steamId, reason);
- PROTORECVEVENT recv = { 0 };
+ PROTORECVEVENT recv = {};
recv.timestamp = now();
recv.szMessage = blob;
recv.lParam = blob.size();
diff --git a/protocols/Steam/src/steam_history.cpp b/protocols/Steam/src/steam_history.cpp
index eb5df8d8c1..9590ceb26d 100644
--- a/protocols/Steam/src/steam_history.cpp
+++ b/protocols/Steam/src/steam_history.cpp
@@ -53,7 +53,7 @@ void CSteamProto::OnGotHistoryMessages(const JSONNode &root, void *arg)
if (timestamp <= storedMessageTS)
continue;
- PROTORECVEVENT recv = { 0 };
+ PROTORECVEVENT recv = {};
recv.timestamp = timestamp;
recv.szMessage = (char *)text.c_str();
diff --git a/protocols/Tox/src/tox_messages.cpp b/protocols/Tox/src/tox_messages.cpp
index 264385db69..77fe39b493 100644
--- a/protocols/Tox/src/tox_messages.cpp
+++ b/protocols/Tox/src/tox_messages.cpp
@@ -51,7 +51,7 @@ void CToxProto::OnFriendMessage(Tox *tox, uint32_t friendNumber, TOX_MESSAGE_TYP
else mir_strncpy(rawMessage, (const char*)message, length + 1);
rawMessage[length] = 0;
- PROTORECVEVENT recv = { 0 };
+ PROTORECVEVENT recv = {};
recv.timestamp = now();
recv.szMessage = rawMessage;
switch (type) {
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp
index 48182b4dea..7d4f3a05fe 100644
--- a/protocols/Twitter/src/connection.cpp
+++ b/protocols/Twitter/src/connection.cpp
@@ -465,7 +465,7 @@ void CTwitterProto::UpdateMessages(bool pre_read)
if (id > dm_since_id_)
dm_since_id_ = id;
- PROTORECVEVENT recv = { 0 };
+ PROTORECVEVENT recv = {};
if (pre_read)
recv.flags |= PREF_CREATEREAD;
if (bIsMe)
diff --git a/protocols/VKontakte/src/vk_history.cpp b/protocols/VKontakte/src/vk_history.cpp
index 5b35d5e48a..25275f915d 100644
--- a/protocols/VKontakte/src/vk_history.cpp
+++ b/protocols/VKontakte/src/vk_history.cpp
@@ -270,7 +270,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque
wszBody += SetBBCString(TranslateT("Message link"), m_vkOptions.BBCForAttachments(), vkbbcUrl,
CMStringW(FORMAT, L"https://vk.com/im?sel=%d&msgid=%d", iUserId, iMessageId));
- PROTORECVEVENT recv = { 0 };
+ PROTORECVEVENT recv = {};
if (bIsRead)
recv.flags |= PREF_CREATEREAD;
if (bIsOut)