Cast away MAKEINTRESOURCE wchar_t* vs WORD* issue we don't care about
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7082 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
161e81c2f5
commit
2bdfe648f0
2 changed files with 6 additions and 5 deletions
|
@ -226,13 +226,13 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG;
|
|||
# define FIELD_OFFSET(t,f) ((UINT_PTR)&(((t*)0)->f))
|
||||
# endif
|
||||
# ifndef MAKEINTRESOURCEA
|
||||
# define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
|
||||
# define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(ULONG_PTR)(i))))
|
||||
# endif
|
||||
# ifndef MAKEINTRESOURCEW
|
||||
# define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))
|
||||
# define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(ULONG_PTR)(i))))
|
||||
# endif
|
||||
# ifndef MAKEINTRESOURCE
|
||||
# ifdef UNICODE
|
||||
# ifdef _UNICODE
|
||||
# define MAKEINTRESOURCE MAKEINTRESOURCEW
|
||||
# else
|
||||
# define MAKEINTRESOURCE MAKEINTRESOURCEA
|
||||
|
|
|
@ -412,7 +412,7 @@ bool CResourceEditor::DeleteResourceT(const TCHAR* szType, WORD szName, LANGID w
|
|||
return UpdateResourceT(szType, szName, wLanguage, 0, 0, Manip);
|
||||
|
||||
assert(!EditorSupportsStringNames() && sizeof(szName));
|
||||
const TCHAR*name = MAKEINTRESOURCE(szName);
|
||||
const TCHAR *name = (const TCHAR*) MAKEINTRESOURCE(szName);
|
||||
unsigned int deleted = 0;
|
||||
for (;; ++deleted) {
|
||||
CResourceDirectoryEntry*pDir = FindResourceLanguageDirEntryT(szType, name, ANYLANGID);
|
||||
|
@ -461,8 +461,9 @@ int CResourceEditor::GetResourceSizeT(const TCHAR* szType, WORD szName, LANGID w
|
|||
|
||||
bool CResourceEditor::ResourceExistsT(const TCHAR* szType, WORD szName, LANGID wLanguage, LANGID*pFoundLanguage) {
|
||||
assert(!EditorSupportsStringNames() && sizeof(szName));
|
||||
const TCHAR *name = (const TCHAR*) MAKEINTRESOURCE(szName);
|
||||
if (wLanguage == ALLLANGID) wLanguage = ANYLANGID;
|
||||
CResourceDirectoryEntry *pRDE = FindResourceLanguageDirEntryT(szType, MAKEINTRESOURCE(szName), wLanguage);
|
||||
CResourceDirectoryEntry *pRDE = FindResourceLanguageDirEntryT(szType, name, wLanguage);
|
||||
if (pFoundLanguage) *pFoundLanguage = pRDE ? pRDE->GetId() : INVALIDLANGID;
|
||||
return pRDE != 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue