From babbd4c9c26d997683280ac663e03b04910b2826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 30 Jul 2022 00:01:49 +0200 Subject: Formatting. This style is more compact and quicker to read once you know what the first two member in LVITEM are (mask and iItem). --- c/datalistview.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'c/datalistview.cpp') diff --git a/c/datalistview.cpp b/c/datalistview.cpp index a091ace..fd37791 100644 --- a/c/datalistview.cpp +++ b/c/datalistview.cpp @@ -44,16 +44,14 @@ void DataListView::ShowEpisode(const int iEpisode) ListView_DeleteAllItems(hWnd); - LVITEM lviKey, lviValue; - lviKey.mask = LVIF_TEXT; - lviValue.mask = LVIF_TEXT; - Frame f; const int iArity = 3; const term_t t = PL_new_term_refs(iArity); if (!PlPut(t, iEpisode)) return; Query q (NULL, PL_predicate("episode_datum", iArity, "episode_data"), t); + LVITEM lviKey = {LVIF_TEXT}; + LVITEM lviValue = {LVIF_TEXT}; for (int i = 0; q.NextSolution(); i++) { std::wstring wsKey; @@ -62,7 +60,6 @@ void DataListView::ShowEpisode(const int iEpisode) if (!(PlGet(t+1, &wsKey) && PlGet(t+2, &wsValue))) continue; - lviKey.mask = LVIF_TEXT; lviKey.iItem = i; lviKey.iSubItem = 0; lviKey.pszText = wsKey.data(); -- cgit v1.2.3