diff options
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r-- | c/episodelistview.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index e23e5d8..b3ee02f 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -245,10 +245,10 @@ int CALLBACK EpisodeListView::SortProc(const LPARAM iItem1, const LPARAM iItem2, { EpisodeListView* const pElv = (EpisodeListView*)lExtra; - LVITEM lvi1, lvi2; - lvi1.mask = lvi2.mask = LVIF_PARAM; - lvi1.iItem = iItem1; lvi2.iItem = iItem2; + LVITEM lvi1 = {LVIF_PARAM, (int)iItem1}; if (!ListView_GetItem(pElv->hWnd, &lvi1)) return 0; + + LVITEM lvi2 = {LVIF_PARAM, (int)iItem2}; if (!ListView_GetItem(pElv->hWnd, &lvi2)) return 0; /* abs(m_iSort) is the 1-based index of the column to sort by. @@ -296,9 +296,7 @@ void EpisodeListView::Update() /* Save scrolling position. */ int iEpTop = 0; { - LVITEM lviTop; - lviTop.iItem = ListView_GetTopIndex(hWnd); - lviTop.mask = LVIF_PARAM; + LVITEM lviTop = {LVIF_PARAM, ListView_GetTopIndex(hWnd)}; ListView_GetItem(hWnd, &lviTop); iEpTop = lviTop.lParam; } @@ -331,8 +329,7 @@ void EpisodeListView::Update() int cItem = 0; { wchar_t wszEpisode[16]; - LVITEM lviEpisode; - lviEpisode.mask = LVIF_TEXT|LVIF_PARAM; + LVITEM lviEpisode = {LVIF_TEXT|LVIF_PARAM}; for (int iEp = 1; iEp <= cEp; iEp++) { extern char g_szLimitScreenwriter[]; extern int g_bViewTVOriginal, g_bViewWatched; |