summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-08-11 21:53:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-08-11 21:53:02 +0000
commit088403332a5a0a0312441a7938ed66f80126018f (patch)
tree97b23edd153c448f619f811bb869b5f2b964ea93 /plugins
parent7eead4e8929a8cacffa457a998800f63497aca4f (diff)
more warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@14917 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ModernOpt/src/modernopt.cpp24
-rw-r--r--plugins/ModernOpt/src/mopt_ignore.cpp2
-rw-r--r--plugins/WinterSpeak/src/AnnounceDialog.h13
-rw-r--r--plugins/WinterSpeak/src/DialogConfigActive.h27
-rw-r--r--plugins/WinterSpeak/src/DialogConfigEngine.h30
-rw-r--r--plugins/WinterSpeak/src/SpeechApi40a.cpp8
-rw-r--r--plugins/WinterSpeak/src/SpeechApi40a.h2
-rw-r--r--plugins/WinterSpeak/src/SpeechInterface.cpp2
-rw-r--r--plugins/WinterSpeak/src/SpeechInterface.h2
9 files changed, 54 insertions, 56 deletions
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp
index 12f11758bf..67b32f6f29 100644
--- a/plugins/ModernOpt/src/modernopt.cpp
+++ b/plugins/ModernOpt/src/modernopt.cpp
@@ -236,8 +236,7 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
break;
case IDC_BTN_EXPERT:
- if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BTN_APPLY)))
- {
+ if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BTN_APPLY))) {
int idResult = MessageBox(hwndDlg,
TranslateT("You have some unsaved changes here.\n Do you wish to apply settings before switching?"),
_T("Miranda NG"), MB_ICONQUESTION | MB_YESNOCANCEL);
@@ -245,23 +244,22 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
sttNotifyPages(dat, (idResult == IDYES) ? PSN_APPLY : PSN_RESET);
}
- { Utils_SaveWindowPosition(hwndDlg, NULL, "Options", "");
- g_iSectionRestore = dat->iSection;
+ Utils_SaveWindowPosition(hwndDlg, NULL, "Options", "");
+ g_iSectionRestore = dat->iSection;
+ {
struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[dat->iPage];
- if (obj->optObject.lpzClassicGroup || obj->optObject.lpzClassicPage)
- {
- OPENOPTIONSDIALOG ood = {0};
+ if (obj->optObject.lpzClassicGroup || obj->optObject.lpzClassicPage) {
+ OPENOPTIONSDIALOG ood = { 0 };
ood.cbSize = sizeof(ood);
ood.pszGroup = obj->optObject.lpzClassicGroup;
ood.pszPage = obj->optObject.lpzClassicPage;
ood.pszTab = obj->optObject.lpzClassicTab;
- HWND hwndOpt = Options_OpenPage(&ood);
- PostMessage(hwndDlg, WM_CLOSE, 0, 0);
+ Options_OpenPage(&ood);
}
- else {
- CallService("Options/OptionsCommand", 0, 0);
- PostMessage(hwndDlg, WM_CLOSE, 0, 0);
- } }
+ else CallService("Options/OptionsCommand", 0, 0);
+
+ PostMessage(hwndDlg, WM_CLOSE, 0, 0);
+ }
break;
case IDOK:
diff --git a/plugins/ModernOpt/src/mopt_ignore.cpp b/plugins/ModernOpt/src/mopt_ignore.cpp
index 8f38231f40..468a63f2f5 100644
--- a/plugins/ModernOpt/src/mopt_ignore.cpp
+++ b/plugins/ModernOpt/src/mopt_ignore.cpp
@@ -34,6 +34,7 @@ void ModernOptIgnore_AddItem(MODERNOPTOBJECT *obj)
SendMessage(g_hwndModernOptIgnore, WM_APP, 0, (LPARAM)obj);
}
+/*
static void ResetListOptions(HWND hwndList)
{
SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, 1, 0);
@@ -49,3 +50,4 @@ static void SetAllContactIcons(HWND hwndList, int count)
SendMessage(hwndList,CLM_SETCHECKMARK,hItem,1);
}
}
+*/ \ No newline at end of file
diff --git a/plugins/WinterSpeak/src/AnnounceDialog.h b/plugins/WinterSpeak/src/AnnounceDialog.h
index 3a3da28f9a..f2f3ed86b6 100644
--- a/plugins/WinterSpeak/src/AnnounceDialog.h
+++ b/plugins/WinterSpeak/src/AnnounceDialog.h
@@ -4,7 +4,9 @@
class AnnounceDialog : public MirandaDialog
{
- public:
+ AnnounceDialog& operator=(const AnnounceDialog&);
+
+public:
AnnounceDialog(AnnounceDatabase &db);
~AnnounceDialog();
@@ -13,10 +15,10 @@ class AnnounceDialog : public MirandaDialog
// Return : true - update the systems configuration
// false - do nothing
//--------------------------------------------------------------------------
- static INT_PTR CALLBACK process(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
+ static INT_PTR CALLBACK process(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
- private:
- void command(HWND window, int control);
+private:
+ void command(HWND window, int control);
//--------------------------------------------------------------------------
// Description : load/save settings to the miranda database
@@ -24,7 +26,6 @@ class AnnounceDialog : public MirandaDialog
void load(HWND window);
void save(HWND window);
- static AnnounceDialog *m_instance;
+ static AnnounceDialog *m_instance;
AnnounceDatabase &m_db;
};
-
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.h b/plugins/WinterSpeak/src/DialogConfigActive.h
index 5c65d44840..da778b3b56 100644
--- a/plugins/WinterSpeak/src/DialogConfigActive.h
+++ b/plugins/WinterSpeak/src/DialogConfigActive.h
@@ -3,23 +3,25 @@
class DialogConfigActive : public MirandaDialog
{
- public:
- //--------------------------------------------------------------------------
+ DialogConfigActive& operator=(const DialogConfigActive&);
+
+public:
+ //--------------------------------------------------------------------------
// Description : Initialise
// Parameters : db - reference to the database to initalise and save
- // control to and from
+ // control to and from
//--------------------------------------------------------------------------
DialogConfigActive(ConfigDatabase &db);
virtual ~DialogConfigActive();
- //--------------------------------------------------------------------------
+ //--------------------------------------------------------------------------
// Description : process a dialog message
// Return : 0 - process ok
- // 1 - error
+ // 1 - error
//--------------------------------------------------------------------------
- static INT_PTR CALLBACK process(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
+ static INT_PTR CALLBACK process(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
- private:
+private:
//--------------------------------------------------------------------------
// Description : load/save setting to the miranda database
//--------------------------------------------------------------------------
@@ -29,9 +31,9 @@ class DialogConfigActive : public MirandaDialog
//--------------------------------------------------------------------------
// Description : select/unselect all the active status checkboxes
- // Parameters : state - the state to apply to the checkboxes
+ // Parameters : state - the state to apply to the checkboxes
//--------------------------------------------------------------------------
- void selectAllUsers(HWND window, bool state);
+ void selectAllUsers(HWND window, bool state);
void ResetListOptions(HWND listview);
void InitialiseItem(HWND hwndList, HANDLE hItem, bool message, bool status);
void SetAllContactIcons(HWND listview);
@@ -39,11 +41,10 @@ class DialogConfigActive : public MirandaDialog
void SetAllChildIcons(HWND hwndList, HANDLE hFirstItem, int iColumn, int iImage);
void SetListGroupIcons(HWND hwndList, HANDLE hFirstItem, HANDLE hParentItem, int *groupChildCount);
void SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem);
-
- static DialogConfigActive *m_instance;
- ConfigDatabase &m_db;
+
+ static DialogConfigActive *m_instance;
+ ConfigDatabase &m_db;
HICON hIcons[4];
HANDLE hItemUnknown;
HANDLE hItemAll;
};
-
diff --git a/plugins/WinterSpeak/src/DialogConfigEngine.h b/plugins/WinterSpeak/src/DialogConfigEngine.h
index b72037288f..e103ec1003 100644
--- a/plugins/WinterSpeak/src/DialogConfigEngine.h
+++ b/plugins/WinterSpeak/src/DialogConfigEngine.h
@@ -7,19 +7,21 @@ class TextToSpeech;
class DialogConfigEngine : public MirandaDialog
{
- public:
+ DialogConfigEngine& operator=(const DialogConfigEngine&);
+
+public:
DialogConfigEngine(ConfigDatabase &db);
virtual ~DialogConfigEngine();
- //--------------------------------------------------------------------------
+ //--------------------------------------------------------------------------
// Description : process a dialog message
// Return : 0 - process ok
- // 1 - error
+ // 1 - error
//--------------------------------------------------------------------------
- static INT_PTR CALLBACK process(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
+ static INT_PTR CALLBACK process(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
- private:
- void command(HWND window, int control);
+private:
+ void command(HWND window, int control);
//--------------------------------------------------------------------------
// Description : load/save setting to the miranda database
@@ -30,12 +32,12 @@ class DialogConfigEngine : public MirandaDialog
//--------------------------------------------------------------------------
// Description : update the voices combo box
//--------------------------------------------------------------------------
- void updateVoices(HWND window);
- void getVoiceDesc(HWND window, VoiceDesc &desc);
- std::wstring getEngine(HWND window);
- bool createTts(HWND window);
-
- static DialogConfigEngine *m_instance;
- ConfigDatabase &m_db;
- std::auto_ptr<TextToSpeech> m_test_tts;
+ void updateVoices(HWND window);
+ void getVoiceDesc(HWND window, VoiceDesc &desc);
+ std::wstring getEngine(HWND window);
+ bool createTts(HWND window);
+
+ static DialogConfigEngine* m_instance;
+ ConfigDatabase& m_db;
+ std::auto_ptr<TextToSpeech> m_test_tts;
};
diff --git a/plugins/WinterSpeak/src/SpeechApi40a.cpp b/plugins/WinterSpeak/src/SpeechApi40a.cpp
index 5be847dbac..7689cd39e4 100644
--- a/plugins/WinterSpeak/src/SpeechApi40a.cpp
+++ b/plugins/WinterSpeak/src/SpeechApi40a.cpp
@@ -218,7 +218,7 @@ std::wstring SpeechApi40a::getDescription()
//------------------------------------------------------------------------------
// private:
//------------------------------------------------------------------------------
-bool SpeechApi40a::loadWithVoice(std::wstring &voice)
+bool SpeechApi40a::loadWithVoice(const std::wstring &voice)
{
CoInitialize(NULL);
@@ -228,18 +228,12 @@ bool SpeechApi40a::loadWithVoice(std::wstring &voice)
// create the enumerator
if (FAILED(CoCreateInstance(CLSID_TTSEnumerator, NULL, CLSCTX_ALL, IID_ITTSEnum, (void**)&pITTSEnum)))
- {
return false;
- }
// iterate through the voices until we find the right one
while (!pITTSEnum->Next(1, &inf, NULL))
- {
if (inf.szModeName == voice)
- {
break;
- }
- }
if (FAILED(CoCreateInstance(CLSID_MMAudioDest, NULL, CLSCTX_ALL, IID_IAudioMultiMediaDevice, (void**)&pAudioDest)))
{
diff --git a/plugins/WinterSpeak/src/SpeechApi40a.h b/plugins/WinterSpeak/src/SpeechApi40a.h
index e9b524f954..fcc1b03421 100644
--- a/plugins/WinterSpeak/src/SpeechApi40a.h
+++ b/plugins/WinterSpeak/src/SpeechApi40a.h
@@ -75,7 +75,7 @@ class SpeechApi40a : public TextToSpeech
//--------------------------------------------------------------------------
// Description : load the speech api with the specified voice
//--------------------------------------------------------------------------
- bool loadWithVoice(std::wstring &voice);
+ bool loadWithVoice(const std::wstring &voice);
ITTSCentralW *m_tts_central;
ITTSAttributesA *m_tts_attribs;
diff --git a/plugins/WinterSpeak/src/SpeechInterface.cpp b/plugins/WinterSpeak/src/SpeechInterface.cpp
index 3fb668934a..fa1282a8a8 100644
--- a/plugins/WinterSpeak/src/SpeechInterface.cpp
+++ b/plugins/WinterSpeak/src/SpeechInterface.cpp
@@ -14,7 +14,7 @@ SpeechInterface::~SpeechInterface()
}
//------------------------------------------------------------------------------
-TextToSpeech * SpeechInterface::createTts(std::wstring &engine) const
+TextToSpeech * SpeechInterface::createTts(const std::wstring &engine) const
{
TextToSpeech *tts = 0;
diff --git a/plugins/WinterSpeak/src/SpeechInterface.h b/plugins/WinterSpeak/src/SpeechInterface.h
index eec7eae4f0..78e51a0f75 100644
--- a/plugins/WinterSpeak/src/SpeechInterface.h
+++ b/plugins/WinterSpeak/src/SpeechInterface.h
@@ -15,7 +15,7 @@ class SpeechInterface
// Parameters : engine - the name of the engine to create
// Returns : an instance of the text to speech engine
//--------------------------------------------------------------------------
- TextToSpeech * createTts(std::wstring &engine) const;
+ TextToSpeech * createTts(const std::wstring &engine) const;
//--------------------------------------------------------------------------
// Description : configure the tts object