ole32: Get rid of casts in WORD serialization helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
46ba55be86
commit
4d605e8683
|
@ -1708,9 +1708,8 @@ static void PropertyStorage_MakeHeader(PropertyStorage_impl *This,
|
|||
PROPERTYSETHEADER *hdr)
|
||||
{
|
||||
assert(hdr);
|
||||
StorageUtl_WriteWord((BYTE *)&hdr->wByteOrder, 0,
|
||||
PROPSETHDR_BYTEORDER_MAGIC);
|
||||
StorageUtl_WriteWord((BYTE *)&hdr->wFormat, 0, This->format);
|
||||
StorageUtl_WriteWord(&hdr->wByteOrder, 0, PROPSETHDR_BYTEORDER_MAGIC);
|
||||
StorageUtl_WriteWord(&hdr->wFormat, 0, This->format);
|
||||
StorageUtl_WriteDWord(&hdr->dwOSVer, 0, This->originatorOS);
|
||||
StorageUtl_WriteGUID((BYTE *)&hdr->clsid, 0, &This->clsid);
|
||||
StorageUtl_WriteDWord(&hdr->reserved, 0, 1);
|
||||
|
@ -1934,7 +1933,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
|
|||
{
|
||||
WORD wTemp;
|
||||
|
||||
StorageUtl_WriteWord((LPBYTE)&wTemp, 0, var->u.iVal);
|
||||
StorageUtl_WriteWord(&wTemp, 0, var->u.iVal);
|
||||
hr = IStream_Write(This->stm, &wTemp, sizeof(wTemp), &count);
|
||||
bytesWritten = count;
|
||||
break;
|
||||
|
|
|
@ -6948,10 +6948,10 @@ void StorageUtl_ReadWord(const BYTE* buffer, ULONG offset, WORD* value)
|
|||
*value = lendian16toh(tmp);
|
||||
}
|
||||
|
||||
void StorageUtl_WriteWord(BYTE* buffer, ULONG offset, WORD value)
|
||||
void StorageUtl_WriteWord(void *buffer, ULONG offset, WORD value)
|
||||
{
|
||||
value = htole16(value);
|
||||
memcpy(buffer+offset, &value, sizeof(WORD));
|
||||
value = htole16(value);
|
||||
memcpy((BYTE *)buffer + offset, &value, sizeof(WORD));
|
||||
}
|
||||
|
||||
void StorageUtl_ReadDWord(const BYTE* buffer, ULONG offset, DWORD* value)
|
||||
|
|
|
@ -556,7 +556,7 @@ StgStreamImpl* StgStreamImpl_Construct(
|
|||
* worry about bit order
|
||||
*/
|
||||
void StorageUtl_ReadWord(const BYTE* buffer, ULONG offset, WORD* value) DECLSPEC_HIDDEN;
|
||||
void StorageUtl_WriteWord(BYTE* buffer, ULONG offset, WORD value) DECLSPEC_HIDDEN;
|
||||
void StorageUtl_WriteWord(void *buffer, ULONG offset, WORD value) DECLSPEC_HIDDEN;
|
||||
void StorageUtl_ReadDWord(const BYTE* buffer, ULONG offset, DWORD* value) DECLSPEC_HIDDEN;
|
||||
void StorageUtl_WriteDWord(void *buffer, ULONG offset, DWORD value) DECLSPEC_HIDDEN;
|
||||
void StorageUtl_ReadULargeInteger(const BYTE* buffer, ULONG offset,
|
||||
|
|
Loading…
Reference in New Issue