aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-26 19:41:11 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-26 19:41:11 +0200
commitb966497200b47ca5efb3a5853891ea4590927371 (patch)
tree45670cff2c4682f0d0c1b1e33c1dddadfe8d58d7 /c/episodelistview.cpp
parent547cbe578dcdb5aa5cfdac1cdb327f92bad21219 (diff)
downloadEpisodeBrowser-b966497200b47ca5efb3a5853891ea4590927371.tar.gz
Use 's' instead of 'str' for as prefix for managed strings.
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index 49e59d1..5aa8850 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -281,16 +281,16 @@ int CALLBACK EpisodeListView::SortProc(const LPARAM iItem1, const LPARAM iItem2,
case ELVSITITLE:
{
Mark m;
- char* sz1,* sz2;
+ std::wstring ws1, ws2;
int cch, cch1, cch2;
- if (!Pl("episode_data","episode_title",lvi1.lParam,&sz1))
+ if (!Pl("episode_data","episode_title",lvi1.lParam,&ws1))
return 0;
- if (!Pl("episode_data","episode_title",lvi2.lParam,&sz2))
+ if (!Pl("episode_data","episode_title",lvi2.lParam,&ws2))
return 0;
- cch1 = strlen(sz1);
- cch2 = strlen(sz2);
+ cch1 = wcslen(ws1.c_str());
+ cch2 = wcslen(ws2.c_str());
cch = cch1 > cch2? cch2: cch1;
- return iOrder*_strnicmp(sz1, sz2, cch);
+ return iOrder*_wcsnicmp(ws1.c_str(), ws2.c_str(), cch);
}
default:
return 0;
@@ -429,12 +429,12 @@ void EpisodeListView::Update()
/* Update episode name and rating. */
void EpisodeListView::UpdateItem(const LVITEM* const pLvi)
{
- std::wstring wstrName;
- if (!Pl("episode_data","episode_title",pLvi->lParam,&wstrName)) {
+ std::wstring wsName;
+ if (!Pl("episode_data","episode_title",pLvi->lParam,&wsName)) {
if (!Pl("episode_data","update_episode_data")) goto r;
- if (!Pl("episode_data","episode_title",pLvi->lParam,&wstrName)) goto r;
+ if (!Pl("episode_data","episode_title",pLvi->lParam,&wsName)) goto r;
}
- ListView_SetItemText(hWnd, pLvi->iItem, ELVSITITLE, wstrName.data());
+ ListView_SetItemText(hWnd, pLvi->iItem, ELVSITITLE, wsName.data());
int iRating;
r: if (!Pl("episode_data","episode_rating",pLvi->lParam,&iRating)) {