From e96b4db3fb46384f286e9297186b87648c7219c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sun, 17 Jul 2022 02:05:15 +0200 Subject: Add const to pointers, update spacing. It seems that "right-spaced" pointers are more widely used among C++ programmers. --- c/episodelistview.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'c/episodelistview.cpp') diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index 4196062..e1119b4 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -10,7 +10,7 @@ #include "listview.h" #include "pl.h" -extern DataListView *g_lpDlv; +extern DataListView* const g_lpDlv; int CALLBACK ElvSort(LPARAM, LPARAM, LPARAM); EpisodeListView::EpisodeListView(const HWND hWndParent) @@ -355,7 +355,7 @@ void EpisodeListView::Update() /* Update episode name and rating. */ void EpisodeListView::UpdateItem(const LPLVITEM lpLvi) { - TCHAR *tszName; + TCHAR* tszName; int iRating; static TCHAR tszRating[3]; @@ -387,8 +387,8 @@ LRESULT CALLBACK EpisodeListView::WndProc(const HWND hWnd, const UINT uMsg, * handled by the NM_RETURN case in ElvHandleNotify. */ const LRESULT lResult = CallWindowProc(m_prevProc, hWnd, uMsg, wParam, lParam); - if (lParam && ((MSG *)lParam)->message == WM_KEYDOWN - && ((MSG *)lParam)->wParam == VK_RETURN) + if (lParam && ((MSG*)lParam)->message == WM_KEYDOWN + && ((MSG*)lParam)->wParam == VK_RETURN) return DLGC_WANTMESSAGE; return lResult; } @@ -399,7 +399,7 @@ LRESULT CALLBACK EpisodeListView::WndProc(const HWND hWnd, const UINT uMsg, int CALLBACK ElvSort(const LPARAM iItem1, const LPARAM iItem2, const LPARAM lExtra) { - EpisodeListView *lpElv = (EpisodeListView *)lExtra; + EpisodeListView* const lpElv = (EpisodeListView*)lExtra; LVITEM lvi1, lvi2; lvi1.mask = lvi2.mask = LVIF_PARAM; @@ -427,7 +427,7 @@ int CALLBACK ElvSort(const LPARAM iItem1, const LPARAM iItem2, const LPARAM lExt } case ELVSITITLE: { - char *sz1, *sz2; + char* sz1,* sz2; int cch, cch1, cch2; if (!Pl("episode_data","episode_title",lvi1.lParam,&sz1)) return 0; -- cgit v1.2.3