aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-24 02:04:38 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-24 02:04:38 +0200
commit3a133c4063cbb81bee9f5bc55427be75d8e584e0 (patch)
tree6404e8c2edca923ab329c51a60841b53f50b484f /c/episodelistview.cpp
parent6c29af9e2aa2f3727da41d85005a5fc654a12aa1 (diff)
downloadEpisodeBrowser-3a133c4063cbb81bee9f5bc55427be75d8e584e0.tar.gz
Use Query object in DataListView::ShowEpisode.
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index 7b9653e..5de5e2e 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -431,21 +431,19 @@ void EpisodeListView::Update()
void EpisodeListView::UpdateItem(const LVITEM* const pLvi)
{
std::basic_string<TCHAR> tstrName;
- int iRating;
- static TCHAR tszRating[3];
-
if (!Pl("episode_data","episode_title",pLvi->lParam,&tstrName)) {
if (!Pl("episode_data","update_episode_data")) goto r;
- if (!Pl("episode_data","episode_title",pLvi->lParam,&tstrName))
- goto r;
+ if (!Pl("episode_data","episode_title",pLvi->lParam,&tstrName)) goto r;
}
ListView_SetItemText(hWnd, pLvi->iItem, ELVSITITLE, tstrName.data());
+ int iRating;
r: if (!Pl("episode_data","episode_rating",pLvi->lParam,&iRating)) {
ListView_SetItemText(hWnd, pLvi->iItem, ELVSIRATING, (TCHAR*)TEXT(""));
return;
}
+ TCHAR tszRating[3];
_stprintf_s(tszRating, sizeof(tszRating), TEXT("%d"), iRating);
ListView_SetItemText(hWnd, pLvi->iItem, ELVSIRATING, tszRating);
}