aboutsummaryrefslogtreecommitdiff
path: root/c/datalistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-17 01:35:16 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-17 01:35:16 +0200
commit26bc41099c10b3a63fd744690df5c25cb713718b (patch)
tree4f314216ec3b6c9f75f003282ca9cb87505772ce /c/datalistview.cpp
parentda04598319bf3ab9d240bbec993222623a4ab85d (diff)
downloadEpisodeBrowser-26bc41099c10b3a63fd744690df5c25cb713718b.tar.gz
Add const to places.
Note that I did NOT add const to non-pointer/non-reference arguments in function declarations (without a following definition), as they do not mean anything there.
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 532e3a6..a25cc83 100644
--- a/c/datalistview.cpp
+++ b/c/datalistview.cpp
@@ -13,7 +13,7 @@
extern EpisodeListView *g_lpElv;
-DataListView::DataListView(HWND hWndParent)
+DataListView::DataListView(const HWND hWndParent)
: ListView(hWndParent, (HMENU)IDC_DATALISTVIEW, LVS_NOCOLUMNHEADER)
{
LVCOLUMN lvc;
@@ -31,7 +31,7 @@ DataListView::DataListView(HWND hWndParent)
ListView_InsertColumn(m_hWnd, DLVSIVALUE, &lvc);
}
-void DataListView::ShowEpisode(int iEpisode)
+void DataListView::ShowEpisode(const int iEpisode)
{
ListView_DeleteAllItems(m_hWnd);
@@ -39,9 +39,9 @@ void DataListView::ShowEpisode(int iEpisode)
lviKey.mask = LVIF_TEXT;
lviValue.mask = LVIF_TEXT;
- term_t t = PL_new_term_refs(3);
+ const term_t t = PL_new_term_refs(3);
if (!PL_put_integer(t,iEpisode)) return;
- qid_t q = PL_open_query(NULL, PL_Q_NORMAL,
+ const qid_t q = PL_open_query(NULL, PL_Q_NORMAL,
PL_predicate("episode_datum", 3, "episode_data"), t);
for (int i = 0; PL_next_solution(q); i++) {