From 94119478207034b767c1d0a4fa5d8950f7b07b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 4 Aug 2022 18:18:37 +0200 Subject: Use C++ casts, nullptr. --- c/datalistview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'c/datalistview.cpp') 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(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(L"Key"); lvc.cx = Dpi(42); ListView_InsertColumn(hWnd, DLVSIKEY, &lvc); lvc.iSubItem = DLVSIVALUE; - lvc.pszText = (wchar_t*)L"Value"; + lvc.pszText = const_cast(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}; -- cgit v1.2.3