Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b1d063b1
Commit
b1d063b1
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
85c02fd7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
tiffformat.c
dlls/windowscodecs/tiffformat.c
+10
-9
No files found.
dlls/windowscodecs/tiffformat.c
View file @
b1d063b1
...
...
@@ -506,9 +506,10 @@ static HRESULT WINAPI TiffDecoder_QueryInterface(IWICBitmapDecoder *iface, REFII
if
(
!
ppv
)
return
E_INVALIDARG
;
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapDecoder
,
iid
))
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapDecoder
,
iid
))
{
*
ppv
=
This
;
*
ppv
=
&
This
->
IWICBitmapDecoder_iface
;
}
else
{
...
...
@@ -716,7 +717,7 @@ static HRESULT WINAPI TiffDecoder_GetFrame(IWICBitmapDecoder *iface,
result
->
cached_tile
=
HeapAlloc
(
GetProcessHeap
(),
0
,
decode_info
.
tile_size
);
if
(
result
->
cached_tile
)
*
ppIBitmapFrame
=
(
IWICBitmapFrameDecode
*
)
result
;
*
ppIBitmapFrame
=
&
result
->
IWICBitmapFrameDecode_iface
;
else
{
hr
=
E_OUTOFMEMORY
;
...
...
@@ -760,7 +761,7 @@ static HRESULT WINAPI TiffFrameDecode_QueryInterface(IWICBitmapFrameDecode *ifac
IsEqualIID
(
&
IID_IWICBitmapSource
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapFrameDecode
,
iid
))
{
*
ppv
=
This
;
*
ppv
=
&
This
->
IWICBitmapFrameDecode_iface
;
}
else
if
(
IsEqualIID
(
&
IID_IWICMetadataBlockReader
,
iid
))
{
...
...
@@ -1271,8 +1272,8 @@ HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
This
->
tiff
=
NULL
;
This
->
initialized
=
FALSE
;
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
;
}
...
...
@@ -1729,7 +1730,7 @@ static HRESULT WINAPI TiffEncoder_QueryInterface(IWICBitmapEncoder *iface, REFII
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapEncoder
,
iid
))
{
*
ppv
=
This
;
*
ppv
=
&
This
->
IWICBitmapEncoder_iface
;
}
else
{
...
...
@@ -1993,8 +1994,8 @@ HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
This
->
num_frames_committed
=
0
;
This
->
committed
=
FALSE
;
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