diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-08 20:23:43 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-08 20:23:43 +0200 |
commit | 156e56230c1819245c0d9165629f8077b6417167 (patch) | |
tree | f9fb97183d4a122a2c2cbd68dad8f7cff6d129b7 /protocols | |
parent | acaea8d0a8a6208181f90d33f31a0270089017b6 (diff) |
code cleaning (using new MS coding style)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_bookmarks.cpp | 3 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_chat.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_disco.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_form.cpp | 3 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_userinfo.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_vcard.cpp | 8 | ||||
-rw-r--r-- | protocols/MRA/src/MraPopUp.cpp | 3 | ||||
-rw-r--r-- | protocols/MSN/src/msn_chat.cpp | 3 | ||||
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 3 |
10 files changed, 20 insertions, 15 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index de12e9075f..dbec3c4e32 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -556,7 +556,7 @@ bool facebook_client::login(const char *username, const char *password) error = utils::text::slashu_to_utf8(utils::text::source_get_value(&resp.data, 2, "<strong>", "</strong")); loginError(parent, error); } - // fall through + __fallthrough; case HTTP_CODE_FORBIDDEN: // Forbidden case HTTP_CODE_NOT_FOUND: // Not Found diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index bceb2b9689..1838665de4 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -137,7 +137,8 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM param->ppro->SetBookmarkRequest(iq);
param->ppro->m_ThreadInfo->send(iq);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, 0);
break;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index c7a739b642..142fe7b535 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -1292,10 +1292,10 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g szTitle.Format(TranslateT("Reason to destroy %s"), gch->ptszID);
if (ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE, "gcReason_"))
ppro->m_ThreadInfo->send(
- XmlNodeIq(L"set", ppro->SerialNext(), gch->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER)
- << XCHILD(L"destroy") << XCHILD(L"reason", szBuffer));
+ XmlNodeIq(L"set", ppro->SerialNext(), gch->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER)
+ << XCHILD(L"destroy") << XCHILD(L"reason", szBuffer));
+ __fallthrough;
- // fall through
case IDM_LEAVE:
ppro->GcQuit(item, 200, nullptr);
break;
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index e6d123e7fd..d1fb73b739 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -962,7 +962,7 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) }
wParam = REFRESH_TIMER;
- // fall through
+ __fallthrough;
case WM_TIMER:
if (wParam == REFRESH_TIMER) {
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index 3e427452fb..bef07afdb5 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -826,7 +826,8 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, (jfi->ppro->*(jfi->pfnSubmit))(n, jfi->userdata);
xmlDestroyNode(n);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
case IDCLOSE:
DestroyWindow(hwndDlg);
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 73f017b910..374c60bee3 100755 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -474,7 +474,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa dat->item = nullptr; break; } - // fall through + __fallthrough; case WM_JABBER_REFRESH: if (dat == nullptr) break; diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index 51676949ab..e39e3a690b 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -591,7 +591,8 @@ static INT_PTR CALLBACK EditEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, mir_snprintf(idstr, "e-mailFlag%d", dat->id);
dat->ppro->setWord(idstr, nFlag);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
break;
@@ -639,7 +640,6 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
- {
char idstr[33];
if (dat->id < 0)
@@ -669,8 +669,8 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (IsDlgButtonChecked(hwndDlg, IDC_PCS)) nFlag |= JABBER_VCTEL_PCS;
mir_snprintf(idstr, "PhoneFlag%d", dat->id);
dat->ppro->setWord(idstr, nFlag);
- }
- // fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
break;
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp index 4d27b75bb3..7338eb2fdb 100644 --- a/protocols/MRA/src/MraPopUp.cpp +++ b/protocols/MRA/src/MraPopUp.cpp @@ -82,7 +82,8 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR EnableWindow(GetDlgItem(hWndDlg, IDC_POPUP_TEXTCOLOR), (bEnabled && bUseWinColors == FALSE));
EnableWindow(GetDlgItem(hWndDlg, IDC_POPUP_TIMEOUT), bEnabled);
}
- // fall through
+ __fallthrough;
+
default:
if ((LOWORD(wParam) == IDC_POPUP_TIMEOUT) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return FALSE;
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index 681a931702..140bb2fdf6 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -209,7 +209,8 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const wchar_t *mChatID switch (gce.iType) {
case GC_EVENT_JOIN:
gce.ptszStatus = MSN_GCGetRole(MSN_GetThreadByChatId(mChatID), target->txt);
- // ..fall through.. //
+ __fallthrough;
+
case GC_EVENT_KICK:
case GC_EVENT_PART:
pszTarget = target->txt;
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 54b9f87f8f..79e9066c07 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -311,7 +311,8 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, const JSONNode &jnNode) break;
case VKERR_FLOOD_CONTROL:
pReq->m_iRetry = 0;
- // fall through
+ __fallthrough;
+
case VKERR_UNKNOWN:
case VKERR_TOO_MANY_REQ_PER_SEC:
case VKERR_INTERNAL_SERVER_ERR:
|