From 9d133477d51dd0271d63520071cdf7a11e71c605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 4 Apr 2022 21:46:19 +0200 Subject: Use file-local instead of function-local static variables. This pollutes the global scope, but it removes the unnecessary check that is otherwise done every time the function is called. --- c/episodelistview.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'c/episodelistview.c') diff --git a/c/episodelistview.c b/c/episodelistview.c index 1389f53..5909f54 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -186,7 +186,6 @@ ElvUpdate() term_t t; /* Format name string. */ - t = T(2); PI(t,i+1) return; tszName = NULL; @@ -196,14 +195,12 @@ ElvUpdate() if (!tszName) return; /* Format episode number string. */ - ep: cb = 100; tszEpisode = malloc(cb*sizeof(TCHAR)); if (!tszEpisode) goto e; _stprintf_s(tszEpisode, cb, TEXT("%d"), i+1); /* Insert item. */ - lviEpisode.iItem = i; lviEpisode.iSubItem = 0; lviEpisode.pszText = tszEpisode; @@ -222,7 +219,6 @@ ElvUpdate() } /* Reset selection and scrolling position. */ - ElvSetTop(iTop); if (LpLviElvSelection) ListView_SetItemState(HElv, LpLviElvSelection->iItem, -- cgit v1.2.3