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
6abda85c
Commit
6abda85c
authored
Jul 24, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Do not assume that vtable is the first element of the object,…
windowscodecs: Do not assume that vtable is the first element of the object, avoid not necessary casts.
parent
6588aea6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
pngformat.c
dlls/windowscodecs/pngformat.c
+14
-14
No files found.
dlls/windowscodecs/pngformat.c
View file @
6abda85c
...
...
@@ -194,7 +194,7 @@ static HRESULT WINAPI PngDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapDecoder
,
iid
))
{
*
ppv
=
This
;
*
ppv
=
&
This
->
IWICBitmapDecoder_iface
;
}
else
{
...
...
@@ -573,11 +573,11 @@ static HRESULT WINAPI PngDecoder_Frame_QueryInterface(IWICBitmapFrameDecode *ifa
IsEqualIID
(
&
IID_IWICBitmapSource
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapFrameDecode
,
iid
))
{
*
ppv
=
iface
;
*
ppv
=
&
This
->
IWICBitmapFrameDecode_
iface
;
}
else
if
(
IsEqualIID
(
&
IID_IWICMetadataBlockReader
,
iid
))
{
*
ppv
=
(
void
**
)
&
This
->
IWICMetadataBlockReader_iface
;
*
ppv
=
&
This
->
IWICMetadataBlockReader_iface
;
}
else
{
...
...
@@ -592,13 +592,13 @@ static HRESULT WINAPI PngDecoder_Frame_QueryInterface(IWICBitmapFrameDecode *ifa
static
ULONG
WINAPI
PngDecoder_Frame_AddRef
(
IWICBitmapFrameDecode
*
iface
)
{
PngDecoder
*
This
=
impl_from_IWICBitmapFrameDecode
(
iface
);
return
I
Unknown_AddRef
((
IUnknown
*
)
This
);
return
I
WICBitmapDecoder_AddRef
(
&
This
->
IWICBitmapDecoder_iface
);
}
static
ULONG
WINAPI
PngDecoder_Frame_Release
(
IWICBitmapFrameDecode
*
iface
)
{
PngDecoder
*
This
=
impl_from_IWICBitmapFrameDecode
(
iface
);
return
I
Unknown_Release
((
IUnknown
*
)
This
);
return
I
WICBitmapDecoder_Release
(
&
This
->
IWICBitmapDecoder_iface
);
}
static
HRESULT
WINAPI
PngDecoder_Frame_GetSize
(
IWICBitmapFrameDecode
*
iface
,
...
...
@@ -766,13 +766,13 @@ static HRESULT WINAPI PngDecoder_Block_QueryInterface(IWICMetadataBlockReader *i
static
ULONG
WINAPI
PngDecoder_Block_AddRef
(
IWICMetadataBlockReader
*
iface
)
{
PngDecoder
*
This
=
impl_from_IWICMetadataBlockReader
(
iface
);
return
I
Unknown_AddRef
((
IUnknown
*
)
This
);
return
I
WICBitmapDecoder_AddRef
(
&
This
->
IWICBitmapDecoder_iface
);
}
static
ULONG
WINAPI
PngDecoder_Block_Release
(
IWICMetadataBlockReader
*
iface
)
{
PngDecoder
*
This
=
impl_from_IWICMetadataBlockReader
(
iface
);
return
I
Unknown_Release
((
IUnknown
*
)
This
);
return
I
WICBitmapDecoder_Release
(
&
This
->
IWICBitmapDecoder_iface
);
}
static
HRESULT
WINAPI
PngDecoder_Block_GetContainerFormat
(
IWICMetadataBlockReader
*
iface
,
...
...
@@ -846,8 +846,8 @@ HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": PngDecoder.lock"
);
ret
=
I
Unknown_QueryInterface
((
IUnknown
*
)
This
,
iid
,
ppv
);
I
Unknown_Release
((
IUnknown
*
)
This
);
ret
=
I
WICBitmapDecoder_QueryInterface
(
&
This
->
IWICBitmapDecoder_iface
,
iid
,
ppv
);
I
WICBitmapDecoder_Release
(
&
This
->
IWICBitmapDecoder_iface
);
return
ret
;
}
...
...
@@ -930,13 +930,13 @@ static HRESULT WINAPI PngFrameEncode_QueryInterface(IWICBitmapFrameEncode *iface
static
ULONG
WINAPI
PngFrameEncode_AddRef
(
IWICBitmapFrameEncode
*
iface
)
{
PngEncoder
*
This
=
impl_from_IWICBitmapFrameEncode
(
iface
);
return
I
Unknown_AddRef
((
IUnknown
*
)
This
);
return
I
WICBitmapEncoder_AddRef
(
&
This
->
IWICBitmapEncoder_iface
);
}
static
ULONG
WINAPI
PngFrameEncode_Release
(
IWICBitmapFrameEncode
*
iface
)
{
PngEncoder
*
This
=
impl_from_IWICBitmapFrameEncode
(
iface
);
return
I
Unknown_Release
((
IUnknown
*
)
This
);
return
I
WICBitmapEncoder_Release
(
&
This
->
IWICBitmapEncoder_iface
);
}
static
HRESULT
WINAPI
PngFrameEncode_Initialize
(
IWICBitmapFrameEncode
*
iface
,
...
...
@@ -1270,7 +1270,7 @@ static HRESULT WINAPI PngEncoder_QueryInterface(IWICBitmapEncoder *iface, REFIID
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapEncoder
,
iid
))
{
*
ppv
=
This
;
*
ppv
=
&
This
->
IWICBitmapEncoder_iface
;
}
else
{
...
...
@@ -1546,8 +1546,8 @@ HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": PngEncoder.lock"
);
ret
=
I
Unknown_QueryInterface
((
IUnknown
*
)
This
,
iid
,
ppv
);
I
Unknown_Release
((
IUnknown
*
)
This
);
ret
=
I
WICBitmapEncoder_QueryInterface
(
&
This
->
IWICBitmapEncoder_iface
,
iid
,
ppv
);
I
WICBitmapEncoder_Release
(
&
This
->
IWICBitmapEncoder_iface
);
return
ret
;
}
...
...
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