Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
fc79250f
Commit
fc79250f
authored
Aug 15, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Remove some unnecessary casts.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
24703e4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
filtermapper.c
dlls/quartz/filtermapper.c
+16
-16
No files found.
dlls/quartz/filtermapper.c
View file @
fc79250f
...
...
@@ -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
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment