diff options
author | John Ankarström <john@ankarstrom.se> | 2022-04-04 21:46:19 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-04-04 21:46:19 +0200 |
commit | 9d133477d51dd0271d63520071cdf7a11e71c605 (patch) | |
tree | 4d4853a5e587e6bcd36abb86484846c004f9ba99 /c/episodelistview.c | |
parent | eaab4e3cf5f5e1c2c4c4e41b91082ea76052122c (diff) | |
download | EpisodeBrowser-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.c | 4 |
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, |