mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 01:40:36 +00:00
[WIN32K]: Avoid (LPWSTR) casts on strings that are LPCWSTR, by just using the corresponding const type LPCWSTR in the functions parameters.
svn path=/trunk/; revision=71484
This commit is contained in:
parent
b98bfa81af
commit
2c7124382b
5 changed files with 16 additions and 16 deletions
|
@ -117,7 +117,7 @@ DWORD
|
|||
FASTCALL
|
||||
GreGetCharacterPlacementW(
|
||||
HDC hdc,
|
||||
LPWSTR pwsz,
|
||||
LPCWSTR pwsz,
|
||||
INT nCount,
|
||||
INT nMaxExtent,
|
||||
LPGCP_RESULTSW pgcpw,
|
||||
|
|
|
@ -3316,7 +3316,7 @@ GreExtTextOutW(
|
|||
IN INT YStart,
|
||||
IN UINT fuOptions,
|
||||
IN OPTIONAL PRECTL lprc,
|
||||
IN LPWSTR String,
|
||||
IN LPCWSTR String,
|
||||
IN INT Count,
|
||||
IN OPTIONAL LPINT Dx,
|
||||
IN DWORD dwCodePage)
|
||||
|
@ -3885,7 +3885,7 @@ NtGdiExtTextOutW(
|
|||
RECTL SafeRect;
|
||||
BYTE LocalBuffer[STACK_TEXT_BUFFER_SIZE];
|
||||
PVOID Buffer = LocalBuffer;
|
||||
LPWSTR SafeString = NULL;
|
||||
LPCWSTR SafeString = NULL;
|
||||
LPINT SafeDx = NULL;
|
||||
ULONG BufSize, StringSize, DxSize = 0;
|
||||
|
||||
|
@ -3922,7 +3922,7 @@ NtGdiExtTextOutW(
|
|||
_SEH2_TRY
|
||||
{
|
||||
/* Put the Dx before the String to assure alignment of 4 */
|
||||
SafeString = (LPWSTR)(((ULONG_PTR)Buffer) + DxSize);
|
||||
SafeString = (LPCWSTR)(((ULONG_PTR)Buffer) + DxSize);
|
||||
|
||||
/* Probe and copy the string */
|
||||
ProbeForRead(UnsafeString, StringSize, 1);
|
||||
|
|
|
@ -23,7 +23,7 @@ GreTextOutW(
|
|||
LPCWSTR lpString,
|
||||
int cchString)
|
||||
{
|
||||
return GreExtTextOutW(hdc, nXStart, nYStart, 0, NULL, (LPWSTR)lpString, cchString, NULL, 0);
|
||||
return GreExtTextOutW(hdc, nXStart, nYStart, 0, NULL, lpString, cchString, NULL, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -35,7 +35,7 @@ BOOL
|
|||
FASTCALL
|
||||
GreGetTextExtentW(
|
||||
HDC hDC,
|
||||
LPWSTR lpwsz,
|
||||
LPCWSTR lpwsz,
|
||||
INT cwc,
|
||||
LPSIZE psize,
|
||||
UINT flOpts)
|
||||
|
@ -92,7 +92,7 @@ BOOL
|
|||
FASTCALL
|
||||
GreGetTextExtentExW(
|
||||
HDC hDC,
|
||||
LPWSTR String,
|
||||
LPCWSTR String,
|
||||
ULONG Count,
|
||||
ULONG MaxExtent,
|
||||
PULONG Fit,
|
||||
|
|
|
@ -126,10 +126,10 @@ BOOL FASTCALL IntGdiGetFontResourceInfo(PUNICODE_STRING,PVOID,DWORD*,DWORD);
|
|||
BOOL FASTCALL ftGdiRealizationInfo(PFONTGDI,PREALIZATION_INFO);
|
||||
DWORD FASTCALL ftGdiGetKerningPairs(PFONTGDI,DWORD,LPKERNINGPAIR);
|
||||
BOOL NTAPI GreExtTextOutW(IN HDC,IN INT,IN INT,IN UINT,IN OPTIONAL RECTL*,
|
||||
IN LPWSTR, IN INT, IN OPTIONAL LPINT, IN DWORD);
|
||||
IN LPCWSTR, IN INT, IN OPTIONAL LPINT, IN DWORD);
|
||||
DWORD FASTCALL IntGetCharDimensions(HDC, PTEXTMETRICW, PDWORD);
|
||||
BOOL FASTCALL GreGetTextExtentW(HDC,LPWSTR,INT,LPSIZE,UINT);
|
||||
BOOL FASTCALL GreGetTextExtentExW(HDC,LPWSTR,ULONG,ULONG,PULONG,PULONG,LPSIZE,FLONG);
|
||||
BOOL FASTCALL GreGetTextExtentW(HDC,LPCWSTR,INT,LPSIZE,UINT);
|
||||
BOOL FASTCALL GreGetTextExtentExW(HDC,LPCWSTR,ULONG,ULONG,PULONG,PULONG,LPSIZE,FLONG);
|
||||
BOOL FASTCALL GreTextOutW(HDC,int,int,LPCWSTR,int);
|
||||
HFONT FASTCALL GreCreateFontIndirectW( LOGFONTW * );
|
||||
BOOL WINAPI GreGetTextMetricsW( _In_ HDC hdc, _Out_ LPTEXTMETRICW lptm);
|
||||
|
|
|
@ -120,7 +120,7 @@ LONG TEXT_TabbedTextOut( HDC hdc,
|
|||
if (lpstr[j] == '\t') break;
|
||||
/* get the extent of the normal character part */
|
||||
#ifdef _WIN32K_
|
||||
GreGetTextExtentW( hdc, (LPWSTR)lpstr + i, j - i , &extent, 0 );
|
||||
GreGetTextExtentW( hdc, lpstr + i, j - i , &extent, 0 );
|
||||
#else
|
||||
GetTextExtentPointW( hdc, lpstr + i, j - i , &extent );
|
||||
#endif
|
||||
|
@ -169,7 +169,7 @@ LONG TEXT_TabbedTextOut( HDC hdc,
|
|||
r.bottom = y + extent.cy;
|
||||
#ifdef _WIN32K_
|
||||
GreExtTextOutW( hdc, x0, y, GreGetBkMode(hdc) == OPAQUE ? ETO_OPAQUE : 0,
|
||||
&r, (LPWSTR)lpstr + i, j - i, NULL, 0 );
|
||||
&r, lpstr + i, j - i, NULL, 0 );
|
||||
#else
|
||||
ExtTextOutW( hdc, x0, y, GetBkMode(hdc) == OPAQUE ? ETO_OPAQUE : 0,
|
||||
&r, lpstr + i, j - i, NULL );
|
||||
|
@ -1029,13 +1029,13 @@ static void TEXT_DrawUnderscore (HDC hdc, int x, int y, const WCHAR *str, int of
|
|||
HPEN hpen;
|
||||
HPEN oldPen;
|
||||
#ifdef _WIN32K_
|
||||
GreGetTextExtentW (hdc, (LPWSTR)str, offset, &size, 0);
|
||||
GreGetTextExtentW (hdc, str, offset, &size, 0);
|
||||
#else
|
||||
GetTextExtentPointW (hdc, str, offset, &size);
|
||||
#endif
|
||||
prefix_x = x + size.cx;
|
||||
#ifdef _WIN32K_
|
||||
GreGetTextExtentW (hdc, (LPWSTR)str, offset+1, &size, 0);
|
||||
GreGetTextExtentW (hdc, str, offset+1, &size, 0);
|
||||
#else
|
||||
GetTextExtentPointW (hdc, str, offset+1, &size);
|
||||
#endif
|
||||
|
@ -1276,7 +1276,7 @@ INT WINAPI DrawTextExWorker( HDC hdc,
|
|||
len_seg = p - str;
|
||||
if (len_seg != len &&
|
||||
#ifdef _WIN32K_
|
||||
!GreGetTextExtentW(hdc, (LPWSTR)str, len_seg, &size, 0))
|
||||
!GreGetTextExtentW(hdc, str, len_seg, &size, 0))
|
||||
#else
|
||||
!GetTextExtentPointW(hdc, str, len_seg, &size))
|
||||
#endif
|
||||
|
@ -1295,7 +1295,7 @@ INT WINAPI DrawTextExWorker( HDC hdc,
|
|||
if (!GreExtTextOutW( hdc, xseg, y,
|
||||
((flags & DT_NOCLIP) ? 0 : ETO_CLIPPED) |
|
||||
((flags & DT_RTLREADING) ? ETO_RTLREADING : 0),
|
||||
rect, (LPWSTR)str, len_seg, NULL, 0 ))
|
||||
rect, str, len_seg, NULL, 0 ))
|
||||
#else
|
||||
if (!ExtTextOutW( hdc, xseg, y,
|
||||
((flags & DT_NOCLIP) ? 0 : ETO_CLIPPED) |
|
||||
|
|
Loading…
Reference in a new issue