Author: dquintana
Date: Fri May 2 17:27:28 2014
New Revision: 63115
URL:
http://svn.reactos.org/svn/reactos?rev=63115&view=rev
Log:
[SHELL32]
* Fix redundant clauses by converting the code to a switch block. Adapted from a patch by
Victor Martinez.
CORE-8161 #resolve #comment Fixed in the shell-experiments branch. Thanks.
Modified:
branches/shell-experiments/dll/win32/shell32/shellitem.cpp
Modified: branches/shell-experiments/dll/win32/shell32/shellitem.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shellitem.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shellitem.cpp [iso-8859-1] Fri May 2
17:27:28 2014
@@ -122,20 +122,24 @@
hr = get_parent_shellfolder(&parent_folder);
if (SUCCEEDED(hr))
{
- if (sigdnName == SIGDN_PARENTRELATIVEEDITING)
+ switch (sigdnName)
+ {
+ case SIGDN_PARENTRELATIVEEDITING:
uFlags = SHGDN_FOREDITING | SHGDN_INFOLDER;
- else if (sigdnName == SIGDN_DESKTOPABSOLUTEEDITING)
+ break;
+ case SIGDN_DESKTOPABSOLUTEEDITING:
uFlags = SHGDN_FOREDITING;
- else if (sigdnName == SIGDN_PARENTRELATIVEEDITING)
- uFlags = SHGDN_FOREDITING | SHGDN_INFOLDER;
- else if (sigdnName == SIGDN_DESKTOPABSOLUTEEDITING)
- uFlags = SHGDN_FOREDITING;
- else if (sigdnName == SIGDN_PARENTRELATIVEPARSING)
+ break;
+ case SIGDN_PARENTRELATIVEPARSING:
uFlags = SHGDN_FORPARSING | SHGDN_INFOLDER;
- else if (sigdnName == SIGDN_DESKTOPABSOLUTEPARSING)
+ break;
+ case SIGDN_DESKTOPABSOLUTEPARSING:
uFlags = SHGDN_FORPARSING;
- else
+ break;
+ default:
uFlags = SHGDN_NORMAL;
+ break;
+ }
hr = parent_folder->GetDisplayNameOf(m_pidl, uFlags, &name);
if (SUCCEEDED(hr))