mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[WIN32SS] Use GDI_HANDLE_* macros for readability (#4797)
This commit is contained in:
committed by
GitHub
parent
23e5d3fe25
commit
dd75ae8eca
@@ -735,7 +735,7 @@ GdiFixUpHandle(HGDIOBJ hGdiObj)
|
||||
{
|
||||
PGDI_TABLE_ENTRY Entry;
|
||||
|
||||
if (((ULONG_PTR)(hGdiObj)) & GDI_HANDLE_UPPER_MASK )
|
||||
if (GDI_HANDLE_GET_UPPER(hGdiObj))
|
||||
{
|
||||
return hGdiObj;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ DeleteObject(HGDIOBJ hObject)
|
||||
return FALSE;
|
||||
|
||||
/* Check if this is a stock object */
|
||||
if ((DWORD_PTR)hObject & GDI_HANDLE_STOCK_MASK)
|
||||
if (GDI_HANDLE_IS_STOCKOBJ(hObject))
|
||||
{
|
||||
/* Ignore the attempt to delete a stock object */
|
||||
DPRINT1("Trying to delete system object 0x%p\n", hObject);
|
||||
|
||||
@@ -961,7 +961,7 @@ IntSetPaletteEntries(
|
||||
PPALETTE palGDI;
|
||||
ULONG numEntries;
|
||||
|
||||
if ((UINT_PTR)hpal & GDI_HANDLE_STOCK_MASK)
|
||||
if (GDI_HANDLE_IS_STOCKOBJ(hpal))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1245,7 +1245,7 @@ NtGdiUnrealizeObject(HGDIOBJ hgdiobj)
|
||||
PPALETTE palGDI;
|
||||
|
||||
if ( !hgdiobj ||
|
||||
((UINT_PTR)hgdiobj & GDI_HANDLE_STOCK_MASK) ||
|
||||
GDI_HANDLE_IS_STOCKOBJ(hgdiobj) ||
|
||||
!GDI_HANDLE_IS_TYPE(hgdiobj, GDI_OBJECT_TYPE_PALETTE) )
|
||||
return Ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user