Commit fc79250f authored by Alexandre Julliard's avatar Alexandre Julliard

quartz: Remove some unnecessary casts.

parent 24703e4c
......@@ -140,7 +140,7 @@ struct Vector
};
/* returns the position it was added at */
static int add_data(struct Vector * v, const BYTE * pData, int size)
static int add_data(struct Vector *v, const void *pData, int size)
{
int index = v->current;
if (v->current + size > v->capacity)
......@@ -156,7 +156,7 @@ static int add_data(struct Vector * v, const BYTE * pData, int size)
return index;
}
static int find_data(const struct Vector * v, const BYTE * pData, int size)
static int find_data(const struct Vector *v, const void *pData, int size)
{
int index;
for (index = 0; index < v->current; index++)
......@@ -404,7 +404,7 @@ static HRESULT FM2_WriteFilterData(const REGFILTER2 * prf2, BYTE **ppData, ULONG
rrf.dwPins = prf2->u.s2.cPins2;
rrf.dwUnused = 0;
add_data(&mainStore, (LPBYTE)&rrf, sizeof(rrf));
add_data(&mainStore, &rrf, sizeof(rrf));
for (i = 0; i < prf2->u.s2.cPins2; i++)
{
......@@ -432,15 +432,15 @@ static HRESULT FM2_WriteFilterData(const REGFILTER2 * prf2, BYTE **ppData, ULONG
rrfp.dwMediums = rgPin2.nMediums;
rrfp.bCategory = rgPin2.clsPinCategory ? 1 : 0;
add_data(&mainStore, (LPBYTE)&rrfp, sizeof(rrfp));
add_data(&mainStore, &rrfp, sizeof(rrfp));
if (rrfp.bCategory)
{
DWORD index = find_data(&clsidStore, (const BYTE*)rgPin2.clsPinCategory, sizeof(CLSID));
DWORD index = find_data(&clsidStore, rgPin2.clsPinCategory, sizeof(CLSID));
if (index == -1)
index = add_data(&clsidStore, (const BYTE*)rgPin2.clsPinCategory, sizeof(CLSID));
index = add_data(&clsidStore, rgPin2.clsPinCategory, sizeof(CLSID));
index += size;
add_data(&mainStore, (LPBYTE)&index, sizeof(index));
add_data(&mainStore, &index, sizeof(index));
}
for (j = 0; j < rgPin2.nMediaTypes; j++)
......@@ -453,26 +453,26 @@ static HRESULT FM2_WriteFilterData(const REGFILTER2 * prf2, BYTE **ppData, ULONG
rt.signature[3] = '3';
rt.signature[0] += j;
rt.dwUnused = 0;
rt.dwOffsetMajor = find_data(&clsidStore, (const BYTE*)rgPin2.lpMediaType[j].clsMajorType, sizeof(CLSID));
rt.dwOffsetMajor = find_data(&clsidStore, rgPin2.lpMediaType[j].clsMajorType, sizeof(CLSID));
if (rt.dwOffsetMajor == -1)
rt.dwOffsetMajor = add_data(&clsidStore, (const BYTE*)rgPin2.lpMediaType[j].clsMajorType, sizeof(CLSID));
rt.dwOffsetMajor = add_data(&clsidStore, rgPin2.lpMediaType[j].clsMajorType, sizeof(CLSID));
rt.dwOffsetMajor += size;
rt.dwOffsetMinor = find_data(&clsidStore, (const BYTE*)clsMinorType, sizeof(CLSID));
rt.dwOffsetMinor = find_data(&clsidStore, clsMinorType, sizeof(CLSID));
if (rt.dwOffsetMinor == -1)
rt.dwOffsetMinor = add_data(&clsidStore, (const BYTE*)clsMinorType, sizeof(CLSID));
rt.dwOffsetMinor = add_data(&clsidStore, clsMinorType, sizeof(CLSID));
rt.dwOffsetMinor += size;
add_data(&mainStore, (LPBYTE)&rt, sizeof(rt));
add_data(&mainStore, &rt, sizeof(rt));
}
for (j = 0; j < rgPin2.nMediums; j++)
{
DWORD index = find_data(&clsidStore, (const BYTE*)(rgPin2.lpMedium + j), sizeof(REGPINMEDIUM));
DWORD index = find_data(&clsidStore, rgPin2.lpMedium + j, sizeof(REGPINMEDIUM));
if (index == -1)
index = add_data(&clsidStore, (const BYTE*)(rgPin2.lpMedium + j), sizeof(REGPINMEDIUM));
index = add_data(&clsidStore, rgPin2.lpMedium + j, sizeof(REGPINMEDIUM));
index += size;
add_data(&mainStore, (LPBYTE)&index, sizeof(index));
add_data(&mainStore, &index, sizeof(index));
}
}
......@@ -1036,7 +1036,7 @@ static HRESULT WINAPI FilterMapper3_EnumMatchingFilters(
{
struct MONIKER_MERIT mm = {pMoniker, rf2.dwMerit};
IMoniker_AddRef(pMoniker);
add_data(&monikers, (LPBYTE)&mm, sizeof(mm));
add_data(&monikers, &mm, sizeof(mm));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment