aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index cdb3dc7..bc01ce9 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -414,17 +414,16 @@ void EpisodeListView::Update()
/* Update episode name and rating. */
void EpisodeListView::UpdateItem(const LVITEM* const pLvi)
{
- Mark m;
- TCHAR* tszName;
+ std::basic_string<TCHAR> tstrName;
int iRating;
static TCHAR tszRating[3];
- if (!Pl("episode_data","episode_title",pLvi->lParam,&tszName)) {
+ 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,&tszName))
+ if (!Pl("episode_data","episode_title",pLvi->lParam,&tstrName))
goto r;
}
- ListView_SetItemText(hWnd, pLvi->iItem, ELVSITITLE, tszName);
+ ListView_SetItemText(hWnd, pLvi->iItem, ELVSITITLE, tstrName.data());
r: if (!Pl("episode_data","episode_rating",pLvi->lParam,&iRating)) {
ListView_SetItemText(hWnd, pLvi->iItem, ELVSIRATING, (TCHAR*)TEXT(""));