From b966dbe7ee7946a76aa773bc4da89ad6847c8177 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sun, 10 Jun 2007 11:50:48 +0000 Subject: [PATCH] convert a switch statement with a range to an if statement (msvc compatibility) svn path=/trunk/; revision=27111 --- reactos/base/shell/explorer-new/traywnd.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/reactos/base/shell/explorer-new/traywnd.c b/reactos/base/shell/explorer-new/traywnd.c index cb3b60449f0..547d9ab8a36 100644 --- a/reactos/base/shell/explorer-new/traywnd.c +++ b/reactos/base/shell/explorer-new/traywnd.c @@ -2337,15 +2337,12 @@ OnTrayWindowContextMenuCommand(IN HWND hWndOwner, if (uiCmdId != 0) { - switch (uiCmdId) + if (uiCmdId >= ID_SHELL_CMD_FIRST && uiCmdId <= ID_SHELL_CMD_LAST) { - case ID_SHELL_CMD_FIRST ... ID_SHELL_CMD_LAST: + CMINVOKECOMMANDINFO cmici = {0}; + + if (pcm != NULL) { - CMINVOKECOMMANDINFO cmici = {0}; - - if (pcm == NULL) - break; - /* Setup and invoke the shell command */ cmici.cbSize = sizeof(cmici); cmici.hwnd = hWndOwner; @@ -2354,13 +2351,12 @@ OnTrayWindowContextMenuCommand(IN HWND hWndOwner, IContextMenu_InvokeCommand(pcm, &cmici); - break; } - - default: - ITrayWindow_ExecContextMenuCmd(ITrayWindow_from_impl(This), - uiCmdId); - break; + } + else + { + ITrayWindow_ExecContextMenuCmd(ITrayWindow_from_impl(This), + uiCmdId); } }