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
29a84c9c
Commit
29a84c9c
authored
Apr 26, 2022
by
Matteo Bruni
Committed by
Alexandre Julliard
May 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/xfile: Don't unnecessarily use long integer type.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6899d16c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
xfile.c
dlls/d3dx9_36/xfile.c
+16
-16
No files found.
dlls/d3dx9_36/xfile.c
View file @
29a84c9c
...
...
@@ -56,7 +56,7 @@ struct d3dx9_file_enum_object
{
ID3DXFileEnumObject
ID3DXFileEnumObject_iface
;
LONG
ref
;
ULONG
nb_children
;
unsigned
int
child_count
;
ID3DXFileData
**
children
;
};
...
...
@@ -66,7 +66,7 @@ struct d3dx9_file_data
LONG
ref
;
BOOL
reference
;
IDirectXFileData
*
dxfile_data
;
ULONG
nb_children
;
unsigned
int
child_count
;
ID3DXFileData
**
children
;
};
...
...
@@ -124,7 +124,7 @@ static ULONG WINAPI d3dx9_file_data_Release(ID3DXFileData *iface)
{
ULONG
i
;
for
(
i
=
0
;
i
<
file_data
->
nb_children
;
++
i
)
for
(
i
=
0
;
i
<
file_data
->
child_count
;
++
i
)
{
ID3DXFileData
*
child
=
file_data
->
children
[
i
];
child
->
lpVtbl
->
Release
(
child
);
...
...
@@ -256,7 +256,7 @@ static HRESULT WINAPI d3dx9_file_data_GetChildren(ID3DXFileData *iface, SIZE_T *
if
(
!
children
)
return
E_POINTER
;
*
children
=
file_data
->
nb_children
;
*
children
=
file_data
->
child_count
;
return
S_OK
;
}
...
...
@@ -337,7 +337,7 @@ static HRESULT d3dx9_file_data_create(IDirectXFileObject *dxfile_object, ID3DXFi
while
(
SUCCEEDED
(
ret
=
IDirectXFileData_GetNextObject
(
object
->
dxfile_data
,
&
data_object
)))
{
if
(
object
->
nb_children
>=
children_array_size
)
if
(
object
->
child_count
>=
children_array_size
)
{
ID3DXFileData
**
new_children
;
...
...
@@ -359,11 +359,11 @@ static HRESULT d3dx9_file_data_create(IDirectXFileObject *dxfile_object, ID3DXFi
}
object
->
children
=
new_children
;
}
ret
=
d3dx9_file_data_create
(
data_object
,
&
object
->
children
[
object
->
nb_children
]);
ret
=
d3dx9_file_data_create
(
data_object
,
&
object
->
children
[
object
->
child_count
]);
IUnknown_Release
(
data_object
);
if
(
FAILED
(
ret
))
break
;
object
->
nb_children
++
;
++
object
->
child_count
;
}
if
(
ret
!=
DXFILEERR_NOMOREOBJECTS
)
{
...
...
@@ -375,12 +375,12 @@ static HRESULT d3dx9_file_data_create(IDirectXFileObject *dxfile_object, ID3DXFi
ID3DXFileData
**
new_children
;
new_children
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
object
->
children
,
sizeof
(
*
object
->
children
)
*
object
->
nb_children
);
sizeof
(
*
object
->
children
)
*
object
->
child_count
);
if
(
new_children
)
object
->
children
=
new_children
;
}
TRACE
(
"Found %u children
\n
"
,
object
->
nb_children
);
TRACE
(
"Found %u children
.
\n
"
,
object
->
child_count
);
*
ret_iface
=
&
object
->
ID3DXFileData_iface
;
...
...
@@ -426,7 +426,7 @@ static ULONG WINAPI d3dx9_file_enum_object_Release(ID3DXFileEnumObject *iface)
{
ULONG
i
;
for
(
i
=
0
;
i
<
file_enum
->
nb_children
;
++
i
)
for
(
i
=
0
;
i
<
file_enum
->
child_count
;
++
i
)
{
ID3DXFileData
*
child
=
file_enum
->
children
[
i
];
child
->
lpVtbl
->
Release
(
child
);
...
...
@@ -454,7 +454,7 @@ static HRESULT WINAPI d3dx9_file_enum_object_GetChildren(ID3DXFileEnumObject *if
if
(
!
children
)
return
E_POINTER
;
*
children
=
file_enum
->
nb_children
;
*
children
=
file_enum
->
child_count
;
return
S_OK
;
}
...
...
@@ -615,7 +615,7 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void *
/* Fill enum object with top level data objects */
while
(
SUCCEEDED
(
ret
=
IDirectXFileEnumObject_GetNextDataObject
(
dxfile_enum_object
,
&
data_object
)))
{
if
(
object
->
nb_children
>=
children_array_size
)
if
(
object
->
child_count
>=
children_array_size
)
{
ID3DXFileData
**
new_children
;
...
...
@@ -638,18 +638,18 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void *
object
->
children
=
new_children
;
}
ret
=
d3dx9_file_data_create
((
IDirectXFileObject
*
)
data_object
,
&
object
->
children
[
object
->
nb_children
]);
&
object
->
children
[
object
->
child_count
]);
IUnknown_Release
(
data_object
);
if
(
FAILED
(
ret
))
break
;
object
->
nb_children
++
;
++
object
->
child_count
;
}
if
(
object
->
children
)
{
ID3DXFileData
**
new_children
;
new_children
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
object
->
children
,
sizeof
(
*
object
->
children
)
*
object
->
nb_children
);
sizeof
(
*
object
->
children
)
*
object
->
child_count
);
if
(
new_children
)
object
->
children
=
new_children
;
}
...
...
@@ -659,7 +659,7 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void *
if
(
ret
!=
DXFILEERR_NOMOREOBJECTS
)
WARN
(
"Cannot get all top level data objects
\n
"
);
TRACE
(
"Found %u children
\n
"
,
object
->
nb_children
);
TRACE
(
"Found %u children
.
\n
"
,
object
->
child_count
);
*
enum_object
=
&
object
->
ID3DXFileEnumObject_iface
;
...
...
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