aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-04-04 21:46:19 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-04-04 21:46:19 +0200
commit9d133477d51dd0271d63520071cdf7a11e71c605 (patch)
tree4d4853a5e587e6bcd36abb86484846c004f9ba99 /c/episodelistview.c
parenteaab4e3cf5f5e1c2c4c4e41b91082ea76052122c (diff)
downloadEpisodeBrowser-9d133477d51dd0271d63520071cdf7a11e71c605.tar.gz
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.
Diffstat (limited to 'c/episodelistview.c')
-rw-r--r--c/episodelistview.c4
1 files changed, 0 insertions, 4 deletions
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,