From 05cf118538fa94f23de1b9d2aa6c236407db9b69 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Fri, 30 Nov 2018 00:14:06 -0700 Subject: [PATCH] ieframe: Turn several variables into static constants. Signed-off-by: Alex Henrie Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/ieframe/iexplore.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/ieframe/iexplore.c b/dlls/ieframe/iexplore.c index 1a83ee38bbe..4f3df13638f 100644 --- a/dlls/ieframe/iexplore.c +++ b/dlls/ieframe/iexplore.c @@ -170,8 +170,8 @@ static void add_fav_to_menu(HMENU favmenu, HMENU menu, LPWSTR title, LPCWSTR url static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) { + static const WCHAR search[] = {'*',0}; WCHAR path[MAX_PATH*2]; - const WCHAR search[] = {'*',0}; WCHAR* filename; HANDLE findhandle; WIN32_FIND_DATAW finddata; @@ -202,9 +202,9 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) if(finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + static const WCHAR ignore1[] = {'.','.',0}; + static const WCHAR ignore2[] = {'.',0}; MENUITEMINFOW item; - const WCHAR ignore1[] = {'.','.',0}; - const WCHAR ignore2[] = {'.',0}; if(!lstrcmpW(filename, ignore1) || !lstrcmpW(filename, ignore2)) continue; @@ -217,9 +217,9 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) add_favs_to_menu(favmenu, item.hSubMenu, path); } else { + static const WCHAR urlext[] = {'.','u','r','l',0}; WCHAR* fileext; WCHAR* url = NULL; - const WCHAR urlext[] = {'.','u','r','l',0}; if(lstrcmpiW(PathFindExtensionW(filename), urlext)) continue; @@ -250,18 +250,18 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) static void add_tbs_to_menu(HMENU menu) { + static const WCHAR toolbar_key[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'I','n','t','e','r','n','e','t',' ', + 'E','x','p','l','o','r','e','r','\\', + 'T','o','o','l','b','a','r',0}; HUSKEY toolbar_handle; - WCHAR toolbar_key[] = {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'I','n','t','e','r','n','e','t',' ', - 'E','x','p','l','o','r','e','r','\\', - 'T','o','o','l','b','a','r',0}; if(SHRegOpenUSKeyW(toolbar_key, KEY_READ, NULL, &toolbar_handle, TRUE) == ERROR_SUCCESS) { + static const WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\\', + 'C','l','a','s','s','e','s','\\','C','L','S','I','D',0}; HUSKEY classes_handle; - WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\\', - 'C','l','a','s','s','e','s','\\','C','L','S','I','D',0}; WCHAR guid[39]; DWORD value_len = ARRAY_SIZE(guid); int i;