diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-17 19:53:11 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-17 19:53:11 +0000 |
commit | b1d1c1adee5a98a6f048b44fb61105d17f8de7e8 (patch) | |
tree | 40b66695522ede885fb3fba8fc5369cb55956b23 /src/modules/icolib/skin2icons.cpp | |
parent | 9a7fd4befd52e57a8ccd624cf7628b532bcd699a (diff) |
fix for core visibility icons
git-svn-id: http://svn.miranda-ng.org/main/trunk@2341 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/icolib/skin2icons.cpp')
-rw-r--r-- | src/modules/icolib/skin2icons.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp index 620a82f0b3..0fd774a087 100644 --- a/src/modules/icolib/skin2icons.cpp +++ b/src/modules/icolib/skin2icons.cpp @@ -308,8 +308,7 @@ HICON IconSourceItem_GetIcon(IconSourceItem* item) int IconSourceItem_ReleaseIcon(IconSourceItem* item)
{
- if (item && item->icon_ref_count)
- {
+ if (item && item->icon_ref_count) {
item->icon_ref_count--;
if ( !item->icon_ref_count) {
if ( !item->icon_size)
@@ -349,15 +348,14 @@ IconSourceItem* GetIconSourceItem(const TCHAR* file, int indx, int cxIcon, int c IconSourceItem* GetIconSourceItemFromPath(const TCHAR* path, int cxIcon, int cyIcon)
{
- TCHAR *comma;
- TCHAR file[ MAX_PATH ];
- int n;
-
if ( !path)
return NULL;
+ TCHAR file[ MAX_PATH ];
lstrcpyn(file, path, SIZEOF(file));
- comma = _tcsrchr(file, ',');
+ TCHAR *comma = _tcsrchr(file, ',');
+
+ int n;
if ( !comma)
n = 0;
else {
@@ -375,7 +373,8 @@ IconSourceItem* CreateStaticIconSourceItem(int cxIcon, int cyIcon) int i=0;
do { // find new unique name
mir_sntprintf(sourceName, SIZEOF(sourceName), _T("*StaticIcon_%d"), i++);
- } while (iconSourceFileList.getIndex(&key) != -1);
+ }
+ while (iconSourceFileList.getIndex(&key) != -1);
IconSourceItem* newItem = (IconSourceItem*)mir_calloc(sizeof(IconSourceItem));
newItem->file = IconSourceFile_Get(sourceName, false);
@@ -440,7 +439,6 @@ static void IcoLib_RemoveSection(SectionItem* section) return;
int indx;
-
if ((indx = sectionList.getIndex(section)) != -1) {
sectionList.remove(indx);
SAFE_FREE((void**)§ion->name);
|