https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d16362731992fb3c9f195…
commit d16362731992fb3c9f1957adbe1d862830ec6139
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Thu Dec 7 23:24:32 2017 +0200
[BROWSEUI] Move _ILIsDesktop to a shared header to avoid having 3 instances of it
---
dll/win32/browseui/explorerband.cpp | 6 ------
dll/win32/browseui/shellbars/CBandSite.h | 5 +++++
dll/win32/browseui/shellbars/CISFBand.cpp | 18 ------------------
dll/win32/browseui/shellbrowser.cpp | 5 -----
4 files changed, 5 insertions(+), 29 deletions(-)
diff --git a/dll/win32/browseui/explorerband.cpp b/dll/win32/browseui/explorerband.cpp
index 2c8cbe8da9..2b398bd2f1 100644
--- a/dll/win32/browseui/explorerband.cpp
+++ b/dll/win32/browseui/explorerband.cpp
@@ -54,12 +54,6 @@ static BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl)
PT_YAGUID == lpPData->type)) || (pidl && pidl->mkid.cb == 0x00)));
}
-static BOOL _ILIsDesktop (LPCITEMIDLIST pidl)
-{
- return (pidl && pidl->mkid.cb == 0x00);
-}
-
-
HRESULT GetDisplayName(LPCITEMIDLIST pidlDirectory,TCHAR *szDisplayName,UINT cchMax,DWORD
uFlags)
{
IShellFolder *pShellFolder = NULL;
diff --git a/dll/win32/browseui/shellbars/CBandSite.h
b/dll/win32/browseui/shellbars/CBandSite.h
index f18cedffb8..c515fbcd05 100644
--- a/dll/win32/browseui/shellbars/CBandSite.h
+++ b/dll/win32/browseui/shellbars/CBandSite.h
@@ -21,6 +21,11 @@
#pragma once
+extern inline BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
+{
+ return (pidl == NULL || pidl->mkid.cb == 0);
+}
+
class CBandSiteBase :
public CComObjectRootEx<CComMultiThreadModelNoCS>,
public IBandSite,
diff --git a/dll/win32/browseui/shellbars/CISFBand.cpp
b/dll/win32/browseui/shellbars/CISFBand.cpp
index 042a10640e..24426f6ebd 100644
--- a/dll/win32/browseui/shellbars/CISFBand.cpp
+++ b/dll/win32/browseui/shellbars/CISFBand.cpp
@@ -22,24 +22,6 @@ TODO:
** Implement responding to theme change
*/
-
-// ***Extras***
-/*++
-* @name _ILIsDesktop
-*
-* Checks whether the given PIDL is of Desktop folder or not.
-*
-* @param pidl
-* PIDL to be checked.
-*
-* @return True if PIDL is of Desktop, otherwise false.
-*
-*--*/
-static BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
-{
- return (pidl == NULL || pidl->mkid.cb == 0);
-}
-
//*****************************************************************************************
// *** CISFBand ***
diff --git a/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp
index b95a4e331d..8126cefe3d 100644
--- a/dll/win32/browseui/shellbrowser.cpp
+++ b/dll/win32/browseui/shellbrowser.cpp
@@ -818,11 +818,6 @@ HRESULT CShellBrowser::BrowseToPIDL(LPCITEMIDLIST pidl, long flags)
return S_OK;
}
-BOOL WINAPI _ILIsDesktop(LPCITEMIDLIST pidl)
-{
- return (pidl == NULL || pidl->mkid.cb == 0);
-}
-
BOOL WINAPI _ILIsPidlSimple(LPCITEMIDLIST pidl)
{
LPCITEMIDLIST pidlnext;