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
d9ae2892
Commit
d9ae2892
authored
Oct 08, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Get rid of the unused icon cache refcount.
parent
975bff62
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
30 deletions
+1
-30
cursoricon.c
dlls/user32/cursoricon.c
+1
-30
No files found.
dlls/user32/cursoricon.c
View file @
d9ae2892
...
...
@@ -85,9 +85,6 @@ typedef struct tagICONCACHE
HRSRC
hRsrc
;
HRSRC
hGroupRsrc
;
HICON
hIcon
;
INT
count
;
}
ICONCACHE
;
static
struct
list
icon_cache
=
LIST_INIT
(
icon_cache
);
...
...
@@ -412,7 +409,6 @@ static HICON CURSORICON_FindSharedIcon( HMODULE hModule, HRSRC hRsrc )
LIST_FOR_EACH_ENTRY
(
ptr
,
&
icon_cache
,
ICONCACHE
,
entry
)
if
(
ptr
->
hModule
==
hModule
&&
ptr
->
hRsrc
==
hRsrc
)
{
ptr
->
count
++
;
hIcon
=
ptr
->
hIcon
;
break
;
}
...
...
@@ -468,7 +464,6 @@ static void CURSORICON_AddSharedIcon( HMODULE hModule, HRSRC hRsrc, HRSRC hGroup
ptr
->
hRsrc
=
hRsrc
;
ptr
->
hIcon
=
hIcon
;
ptr
->
hGroupRsrc
=
hGroupRsrc
;
ptr
->
count
=
1
;
EnterCriticalSection
(
&
IconCrst
);
list_add_head
(
&
icon_cache
,
&
ptr
->
entry
);
...
...
@@ -476,29 +471,6 @@ static void CURSORICON_AddSharedIcon( HMODULE hModule, HRSRC hRsrc, HRSRC hGroup
}
/**********************************************************************
* CURSORICON_DelSharedIcon
*/
static
INT
CURSORICON_DelSharedIcon
(
HICON
hIcon
)
{
INT
count
=
-
1
;
ICONCACHE
*
ptr
;
EnterCriticalSection
(
&
IconCrst
);
LIST_FOR_EACH_ENTRY
(
ptr
,
&
icon_cache
,
ICONCACHE
,
entry
)
if
(
ptr
->
hIcon
==
hIcon
)
{
if
(
ptr
->
count
>
0
)
ptr
->
count
--
;
count
=
ptr
->
count
;
break
;
}
LeaveCriticalSection
(
&
IconCrst
);
return
count
;
}
/**********************************************************************
* get_icon_size
*/
BOOL
get_icon_size
(
HICON
handle
,
SIZE
*
size
)
...
...
@@ -1599,8 +1571,7 @@ BOOL WINAPI DestroyIcon( HICON hIcon )
{
TRACE_
(
icon
)(
"%p
\n
"
,
hIcon
);
if
(
CURSORICON_DelSharedIcon
(
hIcon
)
==
-
1
)
free_icon_handle
(
hIcon
);
if
(
!
CURSORICON_FindCache
(
hIcon
))
free_icon_handle
(
hIcon
);
return
TRUE
;
}
...
...
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