From 48d1a7bf4dadb63c191535769bc1f2cdddc39795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 9 Jan 2022 22:44:21 +0100 Subject: [PATCH] [SHELL32] Use the already existing g_pszShell32 instead of re-defining a new variable holding the very same string. --- dll/win32/shell32/dialogs/dialogs.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dll/win32/shell32/dialogs/dialogs.cpp b/dll/win32/shell32/dialogs/dialogs.cpp index 73de2f363ac..4b05a92ef31 100644 --- a/dll/win32/shell32/dialogs/dialogs.cpp +++ b/dll/win32/shell32/dialogs/dialogs.cpp @@ -164,8 +164,6 @@ DoLoadIcons(HWND hwndDlg, PPICK_ICON_CONTEXT pIconContext, LPCWSTR pszFile) return (pIconContext->nIcons > 0); } -static const LPCWSTR s_pszDefaultPath = L"%SystemRoot%\\system32\\shell32.dll"; - static void NoIconsInFile(HWND hwndDlg, PPICK_ICON_CONTEXT pIconContext) { // Show an error message @@ -174,7 +172,7 @@ static void NoIconsInFile(HWND hwndDlg, PPICK_ICON_CONTEXT pIconContext) MessageBoxW(hwndDlg, strText, strTitle, MB_ICONWARNING); // Load the default icons - DoLoadIcons(hwndDlg, pIconContext, s_pszDefaultPath); + DoLoadIcons(hwndDlg, pIconContext, g_pszShell32); } // Icon size @@ -388,7 +386,7 @@ BOOL WINAPI PickIconDlg( } // Set the default value - StringCchCopyW(IconContext.szPath, _countof(IconContext.szPath), s_pszDefaultPath); + StringCchCopyW(IconContext.szPath, _countof(IconContext.szPath), g_pszShell32); } // Show the dialog