From 095954fe8c0d1a64d8696d0ad0cd0ed395dd6c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 15 Jul 2022 00:50:32 +0200 Subject: Change declaration style. --- c/episodelistview.cpp | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) (limited to 'c/episodelistview.cpp') diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index 15d7ba4..8273e08 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -33,22 +33,19 @@ EpisodeListView::EpisodeListView() : ListView((HMENU)IDC_EPISODELISTVIEW, 0) m_iSort = 1; } -void -EpisodeListView::DoSort() +void EpisodeListView::DoSort() { ListView_SortItemsEx(m_hWnd, ElvSort, (LPARAM)this); } -void -EpisodeListView::EnsureFocusVisible() +void EpisodeListView::EnsureFocusVisible() { int iEpFocus = ListView_GetNextItem(m_hWnd, -1, LVNI_FOCUSED); if (iEpFocus == -1) return; ListView_EnsureVisible(m_hWnd, iEpFocus, TRUE); } -LRESULT -EpisodeListView::HandleNotify(LPARAM lParam) +LRESULT EpisodeListView::HandleNotify(LPARAM lParam) { LPNMLISTVIEW lpNmLv = (LPNMLISTVIEW)lParam; @@ -141,15 +138,13 @@ EpisodeListView::HandleNotify(LPARAM lParam) return 0; } -void -EpisodeListView::Redraw() +void EpisodeListView::Redraw() { RedrawWindow(m_hWnd, NULL, NULL, RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_ALLCHILDREN); } -void -EpisodeListView::SaveFocus() +void EpisodeListView::SaveFocus() { LVITEM lvi; lvi.mask = LVIF_PARAM; @@ -158,8 +153,7 @@ EpisodeListView::SaveFocus() Pl("cfg","set_focus","I",lvi.lParam); } -void -EpisodeListView::SetTop(int iItem) +void EpisodeListView::SetTop(int iItem) { int iLast = ListView_GetItemCount(m_hWnd)-1; ListView_EnsureVisible(m_hWnd, iLast, TRUE); @@ -167,8 +161,7 @@ EpisodeListView::SetTop(int iItem) } /* Select previously focused episode. */ -void -EpisodeListView::RestoreFocus() +void EpisodeListView::RestoreFocus() { int i, iEpisode, iItem; LVFINDINFO lvfi; @@ -202,8 +195,7 @@ s: ListView_SetItemState(m_hWnd, -1, LVIF_STATE, LVIS_SELECTED); } /* Select next/previous unwatched episode. */ -void -EpisodeListView::SelectUnwatched(int iDir) +void EpisodeListView::SelectUnwatched(int iDir) { /* Get focused episode. */ LVITEM lviFocus; @@ -239,8 +231,7 @@ EpisodeListView::SelectUnwatched(int iDir) } while (i++ < 1000); } -void -EpisodeListView::ShowFocus() +void EpisodeListView::ShowFocus() { int iEpFocus = ListView_GetNextItem(m_hWnd, -1, LVNI_FOCUSED); if (iEpFocus == -1) return; @@ -248,8 +239,7 @@ EpisodeListView::ShowFocus() } /* Update episode list. */ -void -EpisodeListView::Update() +void EpisodeListView::Update() { int cEp, i, iEp, iEpFocus, iItem, iItemMark, iItemTopNew; LVITEM lvi, lviEpisode, lviTop; @@ -360,8 +350,7 @@ EpisodeListView::Update() } /* Update episode name and rating. */ -void -EpisodeListView::UpdateItem(LPLVITEM lpLvi) +void EpisodeListView::UpdateItem(LPLVITEM lpLvi) { char *szName; int iRating; @@ -389,8 +378,7 @@ r: if (!Pl("episode_data","episode_rating","Ii",lpLvi->lParam,&iRating)) { f: if (tszName) free(tszName); } -LRESULT CALLBACK -EpisodeListView::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK EpisodeListView::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_GETDLGCODE: @@ -413,8 +401,7 @@ EpisodeListView::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return ListView::WndProc(hWnd, uMsg, wParam, lParam); } -int CALLBACK -ElvSort(LPARAM iItem1, LPARAM iItem2, LPARAM lExtra) +int CALLBACK ElvSort(LPARAM iItem1, LPARAM iItem2, LPARAM lExtra) { EpisodeListView *lpElv = (EpisodeListView *)lExtra; -- cgit v1.2.3