From 9b8bab99996c01b618715297ba1b4a16d8086b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 10 Sep 2024 15:09:58 +0200 Subject: [PATCH] [0.4.15][SHELL32] CDefView.cpp: fix MSVC build warning C5208 This is a cherry-pick the master-commit 0.4.15-dev-8637-g 0293d0c59788d397ff4598688f02d54a8a1aea2f which was one of two commits that were pushed concurrently to me creating the releases/0.4.15 branch, which I branched at 0.4.15-dev-8636-g 945e856031137b566e616248e2f80c92be807c45 but before the "0.4.16-dev" git tag was created. To make sure they won't end up in no-mans-land. [SHELL32] CDefView.cpp: fix MSVC build warning C5208 "unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes." Suggestion by Whindmar Saksit. Use `struct LISTVIEW_SORT_INFO` instead of the typedef, since this is a structure defined and used only in this file, and we don't use pointers to it (LPLISTVIEW_SORT_INFO). (cherry picked from commit 0293d0c59788d397ff4598688f02d54a8a1aea2f) --- dll/win32/shell32/CDefView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp index bb3e88239c2..61bc1581234 100644 --- a/dll/win32/shell32/CDefView.cpp +++ b/dll/win32/shell32/CDefView.cpp @@ -58,7 +58,7 @@ enum { }; #undef FCIDM_SHVIEWLAST // Don't use this constant, change DVIDM_CONTEXTMENU_LAST if you need a new id. -typedef struct +struct LISTVIEW_SORT_INFO { INT8 Direction; bool bLoadedFromViewState; @@ -72,7 +72,7 @@ typedef struct *(UINT*)this = 0; ListColumn = UNSPECIFIEDCOLUMN; } -} LISTVIEW_SORT_INFO, *LPLISTVIEW_SORT_INFO; +}; #define SHV_CHANGE_NOTIFY (WM_USER + 0x1111) #define SHV_UPDATESTATUSBAR (WM_USER + 0x1112)