From 17c4d64be17d0943aad82a406820ad9fefaddaae Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Jun 2012 21:02:17 +0000 Subject: compilation fix git-svn-id: http://svn.miranda-ng.org/main/trunk@690 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TopToolBar/common.h | 2 +- plugins/TopToolBar/toolbar.cpp | 2 +- plugins/TopToolBar/topbutton.cpp | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/TopToolBar') diff --git a/plugins/TopToolBar/common.h b/plugins/TopToolBar/common.h index 4e4c31f393..26620cf85f 100644 --- a/plugins/TopToolBar/common.h +++ b/plugins/TopToolBar/common.h @@ -55,7 +55,7 @@ struct TopButtonInt DWORD CheckFlags(DWORD Flags); void CreateWnd(void); void LoadSettings(void); - void SaveSettings(int &SepCnt, int &LaunchCnt); + void SaveSettings(int *SepCnt, int *LaunchCnt); void SetBitmap(void); __inline bool isSep() const diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp index 8e42322e58..510a3a8989 100644 --- a/plugins/TopToolBar/toolbar.cpp +++ b/plugins/TopToolBar/toolbar.cpp @@ -139,7 +139,7 @@ int SaveAllButtonsOptions() int LaunchCnt = 0; for (int i = 0; i < Buttons.getCount(); i++) - Buttons[i]->SaveSettings(SeparatorCnt,LaunchCnt); + Buttons[i]->SaveSettings(&SeparatorCnt, &LaunchCnt); DBWriteContactSettingByte(0, TTB_OPTDIR, "SepCnt", SeparatorCnt); DBWriteContactSettingByte(0, TTB_OPTDIR, "LaunchCnt", LaunchCnt); diff --git a/plugins/TopToolBar/topbutton.cpp b/plugins/TopToolBar/topbutton.cpp index 205af2a4e7..88d4128c0e 100644 --- a/plugins/TopToolBar/topbutton.cpp +++ b/plugins/TopToolBar/topbutton.cpp @@ -107,22 +107,22 @@ void TopButtonInt::LoadSettings() } } -void TopButtonInt::SaveSettings(int &SepCnt, int &LaunchCnt) +void TopButtonInt::SaveSettings(int *SepCnt, int *LaunchCnt) { char buf[255]; - if ((dwFlags & TTBBF_ISSEPARATOR) && (dwFlags & TTBBF_INTERNAL)) { + if (SepCnt && (dwFlags & TTBBF_ISSEPARATOR) && (dwFlags & TTBBF_INTERNAL)) { char buf1[10]; - _itoa(++SepCnt, buf1, 10); + _itoa(SepCnt[0]++, buf1, 10); char buf2[20]; AS(buf2, "Sep", buf1); DBWriteContactSettingByte(0, TTB_OPTDIR, AS(buf, buf2, "_Position"), arrangedpos); DBWriteContactSettingByte(0, TTB_OPTDIR, AS(buf, buf2, "_Visible"), dwFlags & TTBBF_VISIBLE); } - else if ((dwFlags & TTBBF_ISLBUTTON ) && (dwFlags & TTBBF_INTERNAL)) { + else if (LaunchCnt && (dwFlags & TTBBF_ISLBUTTON ) && (dwFlags & TTBBF_INTERNAL)) { char buf1[10]; - _itoa(++LaunchCnt, buf1, 10); + _itoa(LaunchCnt[0]++, buf1, 10); char buf2[20]; AS(buf2, "Launch", buf1); -- cgit v1.2.3