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 /src | |
parent | acaea8d0a8a6208181f90d33f31a0270089017b6 (diff) |
code cleaning (using new MS coding style)
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/msglog.cpp | 3 | ||||
-rw-r--r-- | src/core/stduserinfo/src/contactinfo.cpp | 10 | ||||
-rw-r--r-- | src/mir_app/src/FontOptions.cpp | 3 | ||||
-rw-r--r-- | src/mir_app/src/chat_opts.cpp | 3 | ||||
-rw-r--r-- | src/mir_app/src/clui.cpp | 3 | ||||
-rw-r--r-- | src/mir_app/src/findadd.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/ignore.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/netliblog.cpp | 3 | ||||
-rw-r--r-- | src/mir_app/src/visibility.cpp | 3 |
10 files changed, 22 insertions, 12 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index 55ca576727..4767d84312 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -850,7 +850,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) return TRUE; } } - // fall through + __fallthrough; case WM_LBUTTONDOWN: case WM_MBUTTONDOWN: diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index dac3fdb793..b06bdb9b64 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -371,7 +371,8 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG }
}
dat->stage = STREAMSTAGE_TAIL;
- // fall through
+ __fallthrough;
+
case STREAMSTAGE_TAIL:
CreateRTFTail(dat->buf);
dat->stage = STREAMSTAGE_STOP;
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp index 4a1c8ba273..41a5c6331e 100644 --- a/src/core/stduserinfo/src/contactinfo.cpp +++ b/src/core/stduserinfo/src/contactinfo.cpp @@ -42,9 +42,12 @@ static INT_PTR CALLBACK EditUserEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar switch (LOWORD(wParam)) {
case IDOK:
GetDlgItemTextA(hwndDlg, IDC_EMAIL, (char*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA), 256);
- //fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
+ __fallthrough;
+
case IDC_EMAIL:
if (HIWORD(wParam) == EN_CHANGE)
EnableWindow(GetDlgItem(hwndDlg, IDOK), GetWindowTextLength(GetDlgItem(hwndDlg, IDC_EMAIL)));
@@ -100,9 +103,12 @@ static INT_PTR CALLBACK EditUserPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar }
if (IsDlgButtonChecked(hwndDlg, IDC_SMS)) mir_strcat(szText, " SMS");
}
- //fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
+ __fallthrough;
+
case IDC_COUNTRY:
if (HIWORD(wParam) != CBN_SELCHANGE)
break;
diff --git a/src/mir_app/src/FontOptions.cpp b/src/mir_app/src/FontOptions.cpp index f3a417ae9f..6e3b97709a 100644 --- a/src/mir_app/src/FontOptions.cpp +++ b/src/mir_app/src/FontOptions.cpp @@ -913,8 +913,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, if (HIWORD(wParam) != LBN_DBLCLK)
return TRUE;
-
- //fall through
+ __fallthrough;
case IDC_CHOOSEFONT:
if (selCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELCOUNT, 0, 0)) {
diff --git a/src/mir_app/src/chat_opts.cpp b/src/mir_app/src/chat_opts.cpp index 705d74a125..2282f53374 100644 --- a/src/mir_app/src/chat_opts.cpp +++ b/src/mir_app/src/chat_opts.cpp @@ -166,7 +166,8 @@ void RegisterFonts(void) FO.szDefFace = L"Webdings";
FO.defColour = RGB(170, 170, 170);
FO.defCharset = SYMBOL_CHARSET;
- // fall through
+ __fallthrough;
+
default:
wcsncpy_s(fontid.backgroundName, LPGENW("Group chat log background"), _TRUNCATE);
break;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index 75c66b3b25..5da831c9de 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -141,7 +141,8 @@ static INT_PTR CALLBACK AskForConfirmationDlgProc(HWND hWnd, UINT msg, WPARAM wP EndDialog(hWnd, IDC_HIDE);
break;
}
- //fall through
+ __fallthrough;
+
case IDCANCEL:
case IDNO:
EndDialog(hWnd, LOWORD(wParam));
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp index 19caaf101a..fdadcd9b7c 100644 --- a/src/mir_app/src/findadd.cpp +++ b/src/mir_app/src/findadd.cpp @@ -439,7 +439,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP GetClientRect(hwndList, &rc); ListView_SetColumnWidth(hwndList, 0, rc.right); } - // fall through + __fallthrough; case WM_MOVE: if (dat && dat->hwndAdvSearch) { diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp index bf7e23e659..86d60be867 100644 --- a/src/mir_app/src/ignore.cpp +++ b/src/mir_app/src/ignore.cpp @@ -253,7 +253,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
- //fall through
+ __fallthrough;
case CLN_CONTACTMOVED:
SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
break;
diff --git a/src/mir_app/src/netliblog.cpp b/src/mir_app/src/netliblog.cpp index c0d17d7b3c..392f8dc4f3 100644 --- a/src/mir_app/src/netliblog.cpp +++ b/src/mir_app/src/netliblog.cpp @@ -247,7 +247,8 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa }
}
InitLog();
- // fall through
+ __fallthrough;
+
case IDCANCEL:
DestroyWindow(hwndDlg);
}
diff --git a/src/mir_app/src/visibility.cpp b/src/mir_app/src/visibility.cpp index e90fd88e05..77536c2c94 100644 --- a/src/mir_app/src/visibility.cpp +++ b/src/mir_app/src/visibility.cpp @@ -171,7 +171,8 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
- //fall through
+ __fallthrough;
+
case CLN_CONTACTMOVED:
SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
break;
|