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
1e469c95
Commit
1e469c95
authored
Jul 07, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Avoid ARRAY_SIZE-like macros.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9cad95d1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+3
-5
shfldr_printers.c
dlls/shell32/shfldr_printers.c
+3
-5
No files found.
dlls/shell32/shfldr_mycomp.c
View file @
1e469c95
...
@@ -87,8 +87,6 @@ static const shvheader mycomputer_header[] =
...
@@ -87,8 +87,6 @@ static const shvheader mycomputer_header[] =
{
NULL
,
0
,
IDS_SHV_COLUMN7
,
SHCOLSTATE_TYPE_STR
|
SHCOLSTATE_ONBYDEFAULT
,
LVCFMT_RIGHT
,
10
},
{
NULL
,
0
,
IDS_SHV_COLUMN7
,
SHCOLSTATE_TYPE_STR
|
SHCOLSTATE_ONBYDEFAULT
,
LVCFMT_RIGHT
,
10
},
};
};
#define MYCOMPUTERSHELLVIEWCOLUMNS sizeof(mycomputer_header)/sizeof(shvheader)
/**************************************************************************
/**************************************************************************
* ISF_MyComputer_Constructor
* ISF_MyComputer_Constructor
*/
*/
...
@@ -799,7 +797,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumnState (
...
@@ -799,7 +797,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumnState (
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
iColumn
,
pcsFlags
);
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
iColumn
,
pcsFlags
);
if
(
!
pcsFlags
||
iColumn
>=
MYCOMPUTERSHELLVIEWCOLUMNS
)
if
(
!
pcsFlags
||
iColumn
>=
ARRAY_SIZE
(
mycomputer_header
)
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
*
pcsFlags
=
mycomputer_header
[
iColumn
].
pcsFlags
;
*
pcsFlags
=
mycomputer_header
[
iColumn
].
pcsFlags
;
...
@@ -826,7 +824,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface,
...
@@ -826,7 +824,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface,
TRACE
(
"(%p)->(%p %i %p)
\n
"
,
This
,
pidl
,
iColumn
,
psd
);
TRACE
(
"(%p)->(%p %i %p)
\n
"
,
This
,
pidl
,
iColumn
,
psd
);
if
(
!
psd
||
iColumn
>=
MYCOMPUTERSHELLVIEWCOLUMNS
)
if
(
!
psd
||
iColumn
>=
ARRAY_SIZE
(
mycomputer_header
)
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
!
pidl
)
if
(
!
pidl
)
...
@@ -871,7 +869,7 @@ static HRESULT WINAPI ISF_MyComputer_fnMapColumnToSCID (IShellFolder2 *iface, UI
...
@@ -871,7 +869,7 @@ static HRESULT WINAPI ISF_MyComputer_fnMapColumnToSCID (IShellFolder2 *iface, UI
TRACE
(
"(%p)->(%u %p)
\n
"
,
This
,
column
,
scid
);
TRACE
(
"(%p)->(%u %p)
\n
"
,
This
,
column
,
scid
);
if
(
column
>=
MYCOMPUTERSHELLVIEWCOLUMNS
)
if
(
column
>=
ARRAY_SIZE
(
mycomputer_header
)
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
return
shellfolder_map_column_to_scid
(
mycomputer_header
,
column
,
scid
);
return
shellfolder_map_column_to_scid
(
mycomputer_header
,
column
,
scid
);
...
...
dlls/shell32/shfldr_printers.c
View file @
1e469c95
...
@@ -63,8 +63,6 @@ static const shvheader printers_header[] = {
...
@@ -63,8 +63,6 @@ static const shvheader printers_header[] = {
{
NULL
,
0
,
IDS_SHV_COL_MODEL
,
SHCOLSTATE_TYPE_STR
|
SHCOLSTATE_ONBYDEFAULT
,
LVCFMT_LEFT
,
20
}
{
NULL
,
0
,
IDS_SHV_COL_MODEL
,
SHCOLSTATE_TYPE_STR
|
SHCOLSTATE_ONBYDEFAULT
,
LVCFMT_LEFT
,
20
}
};
};
#define PRINTERS_FOLDER_COL_NUM sizeof(printers_header)/sizeof(shvheader)
static
HRESULT
WINAPI
IShellFolder_Printers_fnQueryInterface
(
IShellFolder2
*
iface
,
static
HRESULT
WINAPI
IShellFolder_Printers_fnQueryInterface
(
IShellFolder2
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
REFIID
riid
,
LPVOID
*
ppvObj
)
{
{
...
@@ -283,7 +281,7 @@ static HRESULT WINAPI IShellFolder_Printers_fnGetDefaultColumnState (
...
@@ -283,7 +281,7 @@ static HRESULT WINAPI IShellFolder_Printers_fnGetDefaultColumnState (
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
iColumn
,
pcsFlags
);
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
iColumn
,
pcsFlags
);
if
(
iColumn
>=
PRINTERS_FOLDER_COL_NUM
)
if
(
iColumn
>=
ARRAY_SIZE
(
printers_header
)
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
*
pcsFlags
=
printers_header
[
iColumn
].
pcsFlags
;
*
pcsFlags
=
printers_header
[
iColumn
].
pcsFlags
;
...
@@ -306,7 +304,7 @@ static HRESULT WINAPI IShellFolder_Printers_fnGetDetailsOf (IShellFolder2 *iface
...
@@ -306,7 +304,7 @@ static HRESULT WINAPI IShellFolder_Printers_fnGetDetailsOf (IShellFolder2 *iface
TRACE
(
"(%p)->(%p %i %p)
\n
"
,
This
,
pidl
,
iColumn
,
psd
);
TRACE
(
"(%p)->(%p %i %p)
\n
"
,
This
,
pidl
,
iColumn
,
psd
);
if
(
iColumn
>=
PRINTERS_FOLDER_COL_NUM
)
if
(
iColumn
>=
ARRAY_SIZE
(
printers_header
)
)
return
E_NOTIMPL
;
return
E_NOTIMPL
;
if
(
!
pidl
)
if
(
!
pidl
)
...
@@ -323,7 +321,7 @@ static HRESULT WINAPI IShellFolder_Printers_fnMapColumnToSCID (IShellFolder2 *if
...
@@ -323,7 +321,7 @@ static HRESULT WINAPI IShellFolder_Printers_fnMapColumnToSCID (IShellFolder2 *if
TRACE
(
"(%p)->(%u %p)
\n
"
,
This
,
column
,
scid
);
TRACE
(
"(%p)->(%u %p)
\n
"
,
This
,
column
,
scid
);
if
(
column
>=
PRINTERS_FOLDER_COL_NUM
)
if
(
column
>=
ARRAY_SIZE
(
printers_header
)
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
return
shellfolder_map_column_to_scid
(
printers_header
,
column
,
scid
);
return
shellfolder_map_column_to_scid
(
printers_header
,
column
,
scid
);
...
...
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