aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-17 00:50:37 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-17 00:50:37 +0200
commit03fe36165b6767bc4e0d26bf1b1de38fdff3f75e (patch)
treed4145d918964b0b0f93e611de52220632113bfa8 /c/episodelistview.cpp
parent605a3ff052defc3e41542204b0579e528d81ad72 (diff)
downloadEpisodeBrowser-03fe36165b6767bc4e0d26bf1b1de38fdff3f75e.tar.gz
Use SWI-Prolog's wide-character functions.
This avoids the use of TsmFromSz.
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index 5003495..01b4c1a 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -355,18 +355,16 @@ void EpisodeListView::Update()
/* Update episode name and rating. */
void EpisodeListView::UpdateItem(LPLVITEM lpLvi)
{
- std::basic_string<TCHAR> tsmName;
- char *szName;
+ TCHAR *tszName;
int iRating;
static TCHAR tszRating[3];
- if (!Pl("episode_data","episode_title",lpLvi->lParam,&szName)) {
+ if (!Pl("episode_data","episode_title",lpLvi->lParam,&tszName)) {
if (!Pl("episode_data","update_episode_data")) goto r;
- if (!Pl("episode_data","episode_title",lpLvi->lParam,&szName))
+ if (!Pl("episode_data","episode_title",lpLvi->lParam,&tszName))
goto r;
}
- tsmName = TsmFromSz(szName, CP_UTF8);
- ListView_SetItemText(m_hWnd, lpLvi->iItem, ELVSITITLE, tsmName.data());
+ ListView_SetItemText(m_hWnd, lpLvi->iItem, ELVSITITLE, tszName);
r: if (!Pl("episode_data","episode_rating",lpLvi->lParam,&iRating)) {
ListView_SetItemText(m_hWnd, lpLvi->iItem, ELVSIRATING, TEXT(""));