From 15d591fa08f0c151672713a0d664b280540099e8 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Tue, 11 Sep 2007 23:45:29 +0100 Subject: [PATCH] shell32: Constify some variables. --- dlls/shell32/pidl.c | 8 ++++---- dlls/shell32/pidl.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c index ef249273c49..bf15e055722 100644 --- a/dlls/shell32/pidl.c +++ b/dlls/shell32/pidl.c @@ -2304,7 +2304,7 @@ void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl) * * copies an aPidl struct */ -LPITEMIDLIST* _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl) +LPITEMIDLIST* _ILCopyaPidl(const LPCITEMIDLIST * apidlsrc, UINT cidl) { UINT i; LPITEMIDLIST *apidldest; @@ -2324,7 +2324,7 @@ LPITEMIDLIST* _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl) * * creates aPidl from CIDA */ -LPITEMIDLIST* _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida) +LPITEMIDLIST* _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, const CIDA * cida) { UINT i; LPITEMIDLIST *dst; @@ -2334,10 +2334,10 @@ LPITEMIDLIST* _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida) return NULL; if (pidl) - *pidl = ILClone((LPITEMIDLIST)(&((LPBYTE)cida)[cida->aoffset[0]])); + *pidl = ILClone((LPCITEMIDLIST)(&((const BYTE*)cida)[cida->aoffset[0]])); for (i = 0; i < cida->cidl; i++) - dst[i] = ILClone((LPITEMIDLIST)(&((LPBYTE)cida)[cida->aoffset[i + 1]])); + dst[i] = ILClone((LPCITEMIDLIST)(&((const BYTE*)cida)[cida->aoffset[i + 1]])); return dst; } diff --git a/dlls/shell32/pidl.h b/dlls/shell32/pidl.h index 06372fa7820..010947c19cb 100644 --- a/dlls/shell32/pidl.h +++ b/dlls/shell32/pidl.h @@ -275,8 +275,8 @@ BOOL pcheck (LPCITEMIDLIST pidl); * aPidl helper */ void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl); -LPITEMIDLIST * _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl); -LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida); +LPITEMIDLIST * _ILCopyaPidl(const LPCITEMIDLIST * apidlsrc, UINT cidl); +LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, const CIDA * cida); BOOL WINAPI ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD type); BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type);