From f278ce2aeee7db45417b5cc2f3a3af2bba304cee Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 11 Mar 2012 11:13:17 +0000 Subject: [PATCH] [SHELL32] Fix redundant check Clarify variable usage svn path=/trunk/; revision=56114 --- reactos/dll/win32/shell32/shlmenu.cpp | 4 ++-- reactos/dll/win32/shell32/shlview.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/shell32/shlmenu.cpp b/reactos/dll/win32/shell32/shlmenu.cpp index 04d95d7aad7..0e41fcfec53 100644 --- a/reactos/dll/win32/shell32/shlmenu.cpp +++ b/reactos/dll/win32/shell32/shlmenu.cpp @@ -908,7 +908,7 @@ UINT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAd { miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ - if (miiSrc.wID > uIDAdjustMax && miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ + if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ continue; if (uIDMax <= miiSrc.wID) /* remember the highest ID */ uIDMax = miiSrc.wID + 1; @@ -934,7 +934,7 @@ UINT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAd { miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ - if (miiSrc.wID > uIDAdjustMax && miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */{ + if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */{ continue; } if (uIDMax <= miiSrc.wID) /* remember the highest ID */ diff --git a/reactos/dll/win32/shell32/shlview.cpp b/reactos/dll/win32/shell32/shlview.cpp index f593ef20e7e..4748057176c 100644 --- a/reactos/dll/win32/shell32/shlview.cpp +++ b/reactos/dll/win32/shell32/shlview.cpp @@ -1421,7 +1421,7 @@ void CDefView::DoActivate(UINT uState) TRACE("%p uState=%x\n", this, uState); /*don't do anything if the state isn't really changing */ - if (uState == uState) + if (this->uState == uState) { return; } @@ -2179,7 +2179,7 @@ HRESULT WINAPI CDefView::UIActivate(UINT uState) TRACE("(%p)->(state=%x) stub\n", this, uState); /*don't do anything if the state isn't really changing*/ - if (uState == uState) + if (this->uState == uState) { return S_OK; }