diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-02 23:50:58 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-02 23:50:58 +0200 |
commit | 23dc657f0af27bdac887f8d18208d544cc9f010e (patch) | |
tree | a2656d96f11f879d6a4233fef736493a1cc39ba6 /c/datalistview.cpp | |
parent | edce20642b6d177ee9877775cbfa9e05ebb4e404 (diff) | |
download | EpisodeBrowser-23dc657f0af27bdac887f8d18208d544cc9f010e.tar.gz |
Improve wstring_owner, rename to wchar_ptr.
The user-defined conversion function makes the interface a lot simpler
AND safer.
Diffstat (limited to 'c/datalistview.cpp')
-rw-r--r-- | c/datalistview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/c/datalistview.cpp b/c/datalistview.cpp index ecaa76f..cdc6dfb 100644 --- a/c/datalistview.cpp +++ b/c/datalistview.cpp @@ -64,20 +64,20 @@ void DataListView::ShowEpisode(const int iEpisode) LVITEM lviValue = {LVIF_TEXT}; for (int i = 0; q.NextSolution(std::nothrow); i++) { - wstring_owner key; - wstring_owner value; + wchar_ptr key; + wchar_ptr value; if (!(PlGet(t+1, &key) && PlGet(t+2, &value))) continue; lviKey.iItem = i; lviKey.iSubItem = 0; - lviKey.pszText = key.p; + lviKey.pszText = key; ListView_InsertItem(hWnd, &lviKey); lviValue.iItem = i; lviValue.iSubItem = 1; - lviValue.pszText = value.p; + lviValue.pszText = value; ListView_SetItem(hWnd, &lviValue); } |