Skip to content

Commit

Permalink
Remove some unused parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Oct 24, 2024
1 parent a263fdd commit 1c63449
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 22 deletions.
4 changes: 2 additions & 2 deletions matepath/src/Dialogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1900,7 +1900,7 @@ INT_PTR CALLBACK OpenWithDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lPa
#endif
};
ListView_InsertColumn(hwndLV, 0, &lvc);
DirList_Init(hwndLV, nullptr);
DirList_Init(hwndLV);
DirList_Fill(hwndLV, tchOpenWithDir, DL_ALLOBJECTS, nullptr, false, flagNoFadeHidden, DS_NAME, false);
DirList_StartIconThread(hwndLV);
ListView_SetItemState(hwndLV, 0, LVIS_FOCUSED, LVIS_FOCUSED);
Expand Down Expand Up @@ -1947,7 +1947,7 @@ INT_PTR CALLBACK OpenWithDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lPa
HWND hwndLV = GetDlgItem(hwnd, IDC_OPENWITHDIR);
switch (pnmh->code) {
case LVN_GETDISPINFO:
DirList_GetDispInfo(hwndLV, lParam, flagNoFadeHidden);
DirList_GetDispInfo(hwndLV, lParam);
break;

case LVN_DELETEITEM:
Expand Down
7 changes: 2 additions & 5 deletions matepath/src/Dlapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ static inline LPCITEMIDLIST IL_Next(LPCITEMIDLIST pidl) noexcept {
//
// Initializes the DLDATA structure and sets up the listview control
//
void DirList_Init(HWND hwnd, LPCWSTR pszHeader) noexcept {
UNREFERENCED_PARAMETER(pszHeader);

void DirList_Init(HWND hwnd) noexcept {
// Allocate DirListData Property
DLDATA *lpdl = static_cast<DLDATA *>(GlobalAlloc(GPTR, sizeof(DLDATA)));
SetProp(hwnd, pDirListProp, lpdl);
Expand Down Expand Up @@ -342,9 +340,8 @@ DWORD WINAPI DirList_IconThread(LPVOID lpParam) {
// Must be called in response to a WM_NOTIFY/LVN_GETDISPINFO message from
// the listview control
//
bool DirList_GetDispInfo(HWND hwnd, LPARAM lParam, bool bNoFadeHidden) {
bool DirList_GetDispInfo(HWND hwnd, LPARAM lParam) {
UNREFERENCED_PARAMETER(hwnd);
UNREFERENCED_PARAMETER(bNoFadeHidden);

LV_DISPINFO *lpdi = AsPointer<LV_DISPINFO *>(lParam);
LV_ITEMDATA *lplvid = AsPointer<LV_ITEMDATA *>(lpdi->item.lParam);
Expand Down
4 changes: 2 additions & 2 deletions matepath/src/Dlapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct LV_ITEMDATA {
LPSHELLFOLDER lpsf; // Parent IShellFolder Interface
};

void DirList_Init(HWND hwnd, LPCWSTR pszHeader) noexcept;
void DirList_Init(HWND hwnd) noexcept;
void DirList_Destroy(HWND hwnd);
void DirList_StartIconThread(HWND hwnd) noexcept;

Expand All @@ -36,7 +36,7 @@ int DirList_Fill(HWND hwnd, LPCWSTR lpszDir, DWORD grfFlags, LPCWSTR lpszFileSpe
bool bExcludeFilter, bool bNoFadeHidden,
int iSortFlags, bool fSortRev);
DWORD WINAPI DirList_IconThread(LPVOID lpParam);
bool DirList_GetDispInfo(HWND hwnd, LPARAM lParam, bool bNoFadeHidden);
bool DirList_GetDispInfo(HWND hwnd, LPARAM lParam);
bool DirList_DeleteItem(HWND hwnd, LPARAM lParam);

#define DS_NAME 0
Expand Down
4 changes: 2 additions & 2 deletions matepath/src/matepath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ LRESULT MsgCreate(HWND hwnd, WPARAM wParam, LPARAM lParam) noexcept {
};
ListView_SetExtendedListViewStyle(hwndDirList, LVS_EX_DOUBLEBUFFER | LVS_EX_LABELTIP);
ListView_InsertColumn(hwndDirList, 0, &lvc);
DirList_Init(hwndDirList, nullptr);
DirList_Init(hwndDirList);
if (bTrackSelect) {
ListView_SetExtendedListViewStyleEx(hwndDirList,
LVS_EX_TRACKSELECT | LVS_EX_ONECLICKACTIVATE,
Expand Down Expand Up @@ -2106,7 +2106,7 @@ LRESULT MsgNotify(HWND hwnd, WPARAM wParam, LPARAM lParam) {
break;

case LVN_GETDISPINFO:
DirList_GetDispInfo(hwndDirList, lParam, flagNoFadeHidden);
DirList_GetDispInfo(hwndDirList, lParam);
break;

case LVN_DELETEITEM:
Expand Down
8 changes: 4 additions & 4 deletions src/Dialogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ static INT_PTR CALLBACK OpenWithDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPA
#endif
};
ListView_InsertColumn(hwndLV, 0, &lvc);
DirList_Init(hwndLV, nullptr);
DirList_Init(hwndLV);
DirList_Fill(hwndLV, tchOpenWithDir, DL_ALLOBJECTS, nullptr, false, flagNoFadeHidden, DS_NAME, false);
DirList_StartIconThread(hwndLV);
ListView_SetItemState(hwndLV, 0, LVIS_FOCUSED, LVIS_FOCUSED);
Expand Down Expand Up @@ -636,7 +636,7 @@ static INT_PTR CALLBACK OpenWithDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPA
if (pnmh->idFrom == IDC_OPENWITHDIR) {
switch (pnmh->code) {
case LVN_GETDISPINFO:
DirList_GetDispInfo(GetDlgItem(hwnd, IDC_OPENWITHDIR), lParam, flagNoFadeHidden);
DirList_GetDispInfo(GetDlgItem(hwnd, IDC_OPENWITHDIR), lParam);
break;

case LVN_DELETEITEM:
Expand Down Expand Up @@ -765,7 +765,7 @@ static INT_PTR CALLBACK FavoritesDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LP
#endif
};
ListView_InsertColumn(hwndLV, 0, &lvc);
DirList_Init(hwndLV, nullptr);
DirList_Init(hwndLV);
DirList_Fill(hwndLV, tchFavoritesDir, DL_ALLOBJECTS, nullptr, false, flagNoFadeHidden, DS_NAME, false);
DirList_StartIconThread(hwndLV);
ListView_SetItemState(hwndLV, 0, LVIS_FOCUSED, LVIS_FOCUSED);
Expand Down Expand Up @@ -812,7 +812,7 @@ static INT_PTR CALLBACK FavoritesDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LP
if (pnmh->idFrom == IDC_FAVORITESDIR) {
switch (pnmh->code) {
case LVN_GETDISPINFO:
DirList_GetDispInfo(GetDlgItem(hwnd, IDC_OPENWITHDIR), lParam, flagNoFadeHidden);
DirList_GetDispInfo(GetDlgItem(hwnd, IDC_OPENWITHDIR), lParam);
break;

case LVN_DELETEITEM:
Expand Down
7 changes: 2 additions & 5 deletions src/Dlapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ static inline LPCITEMIDLIST IL_Next(LPCITEMIDLIST pidl) noexcept {
//
// Initializes the DLDATA structure and sets up the listview control
//
void DirList_Init(HWND hwnd, LPCWSTR pszHeader) noexcept {
UNREFERENCED_PARAMETER(pszHeader);

void DirList_Init(HWND hwnd) noexcept {
// Allocate DirListData Property
DLDATA *lpdl = static_cast<DLDATA *>(GlobalAlloc(GPTR, sizeof(DLDATA)));
SetProp(hwnd, pDirListProp, lpdl);
Expand Down Expand Up @@ -345,9 +343,8 @@ DWORD WINAPI DirList_IconThread(LPVOID lpParam) {
// Must be called in response to a WM_NOTIFY/LVN_GETDISPINFO message from
// the listview control
//
bool DirList_GetDispInfo(HWND hwnd, LPARAM lParam, bool bNoFadeHidden) {
bool DirList_GetDispInfo(HWND hwnd, LPARAM lParam) {
UNREFERENCED_PARAMETER(hwnd);
UNREFERENCED_PARAMETER(bNoFadeHidden);

LV_DISPINFO *lpdi = AsPointer<LV_DISPINFO *>(lParam);
LV_ITEMDATA *lplvid = AsPointer<LV_ITEMDATA *>(lpdi->item.lParam);
Expand Down
4 changes: 2 additions & 2 deletions src/Dlapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct LV_ITEMDATA {
LPSHELLFOLDER lpsf; // Parent IShellFolder Interface
};

void DirList_Init(HWND hwnd, LPCWSTR pszHeader) noexcept;
void DirList_Init(HWND hwnd) noexcept;
void DirList_Destroy(HWND hwnd);
void DirList_StartIconThread(HWND hwnd) noexcept;

Expand All @@ -36,7 +36,7 @@ int DirList_Fill(HWND hwnd, LPCWSTR lpszDir, DWORD grfFlags, LPCWSTR lpszFileSpe
bool bExcludeFilter, bool bNoFadeHidden, int iSortFlags, bool fSortRev);

DWORD WINAPI DirList_IconThread(LPVOID lpParam);
bool DirList_GetDispInfo(HWND hwnd, LPARAM lParam, bool bNoFadeHidden);
bool DirList_GetDispInfo(HWND hwnd, LPARAM lParam);
bool DirList_DeleteItem(HWND hwnd, LPARAM lParam);

#define DS_NAME 0
Expand Down

0 comments on commit 1c63449

Please sign in to comment.