aboutsummaryrefslogtreecommitdiff
path: root/c/datalistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-04 18:18:37 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-04 18:19:37 +0200
commit94119478207034b767c1d0a4fa5d8950f7b07b02 (patch)
treece9ffb57a4947855b09c54017f6b2abe3e8af6d3 /c/datalistview.cpp
parent1c218db34a3bd4aba5c1c088561b91b02e691fde (diff)
downloadEpisodeBrowser-94119478207034b767c1d0a4fa5d8950f7b07b02.tar.gz
Use C++ casts, nullptr.
Diffstat (limited to 'c/datalistview.cpp')
-rw-r--r--c/datalistview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/c/datalistview.cpp b/c/datalistview.cpp
index bd5c8d9..531dc2c 100644
--- a/c/datalistview.cpp
+++ b/c/datalistview.cpp
@@ -12,19 +12,19 @@
#include "pl.h"
DataListView::DataListView(const HWND hWndParent)
- : ListView(hWndParent, (HMENU)IDC_DATALISTVIEW, LVS_NOCOLUMNHEADER)
+ : ListView(hWndParent, reinterpret_cast<HMENU>(IDC_DATALISTVIEW), LVS_NOCOLUMNHEADER)
{
LVCOLUMN lvc;
lvc.mask = LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM;
lvc.iSubItem = DLVSIKEY;
- lvc.pszText = (wchar_t*)L"Key";
+ lvc.pszText = const_cast<wchar_t*>(L"Key");
lvc.cx = Dpi(42);
ListView_InsertColumn(hWnd, DLVSIKEY, &lvc);
lvc.iSubItem = DLVSIVALUE;
- lvc.pszText = (wchar_t*)L"Value";
+ lvc.pszText = const_cast<wchar_t*>(L"Value");
lvc.cx = 500;
ListView_InsertColumn(hWnd, DLVSIVALUE, &lvc);
}
@@ -58,7 +58,7 @@ void DataListView::ShowEpisode(const int iEpisode)
const term_t t = PL_new_term_refs(arity);
if (!PlPut(t, iEpisode)) return;
- Query q (NULL, PL_predicate("episode_datum", arity, "episode_data"), t);
+ Query q (nullptr, PL_predicate("episode_datum", arity, "episode_data"), t);
LVITEM lviKey = {LVIF_TEXT};
LVITEM lviValue = {LVIF_TEXT};