diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/WinterSpeak | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/WinterSpeak')
-rw-r--r-- | plugins/WinterSpeak/src/AnnounceDialog.cpp | 6 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/DialogConfigActive.cpp | 12 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/DialogConfigEngine.cpp | 6 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/MirandaDialog.cpp | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/ProtocolInformation.cpp | 14 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeakConfig.cpp | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeechApi40a.cpp | 28 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeechApi40aLexicon.cpp | 4 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeechApi51.cpp | 24 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeechApi51Lexicon.cpp | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeechInterface.cpp | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/UserInformation.cpp | 4 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/main.cpp | 8 |
13 files changed, 57 insertions, 57 deletions
diff --git a/plugins/WinterSpeak/src/AnnounceDialog.cpp b/plugins/WinterSpeak/src/AnnounceDialog.cpp index ab9ddb8384..75c4d947ee 100644 --- a/plugins/WinterSpeak/src/AnnounceDialog.cpp +++ b/plugins/WinterSpeak/src/AnnounceDialog.cpp @@ -2,7 +2,7 @@ #include "AnnounceDialog.h"
-AnnounceDialog *AnnounceDialog::m_instance = 0;
+AnnounceDialog *AnnounceDialog::m_instance = nullptr;
//------------------------------------------------------------------------------
// public:
@@ -15,7 +15,7 @@ AnnounceDialog::AnnounceDialog(AnnounceDatabase &db) : m_db(db) //------------------------------------------------------------------------------
AnnounceDialog::~AnnounceDialog()
{
- m_instance = 0;
+ m_instance = nullptr;
}
//------------------------------------------------------------------------------
@@ -141,7 +141,7 @@ AnnounceDialog::save(HWND window) m_db.setEventFlag(AnnounceDatabase::EventFlag_DialogOpen, (IsDlgButtonChecked(window, IDC_DIALOG_OPEN) != 0));
m_db.setEventFlag(AnnounceDatabase::EventFlag_DialogFocused, (IsDlgButtonChecked(window, IDC_DIALOG_FOCUSED) != 0));
- m_db.setMaxMsgSize(GetDlgItemInt(window, IDC_MAX_MSG, NULL, 0));
+ m_db.setMaxMsgSize(GetDlgItemInt(window, IDC_MAX_MSG, nullptr, 0));
m_instance->m_db.save();
}
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp index f6061d0258..78f798bfcc 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.cpp +++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp @@ -2,7 +2,7 @@ #include "DialogConfigActive.h"
//------------------------------------------------------------------------------
-DialogConfigActive *DialogConfigActive::m_instance = 0;
+DialogConfigActive *DialogConfigActive::m_instance = nullptr;
//------------------------------------------------------------------------------
// public:
@@ -15,7 +15,7 @@ DialogConfigActive::DialogConfigActive(ConfigDatabase &db) : m_db(db) //------------------------------------------------------------------------------
DialogConfigActive::~DialogConfigActive()
{
- m_instance = 0;
+ m_instance = nullptr;
}
//------------------------------------------------------------------------------
@@ -98,7 +98,7 @@ void DialogConfigActive::notify(HWND hwndDlg, LPARAM lParam) SetAllContactIcons(GetDlgItem(hwndDlg, IDC_ACTIVE_USERS));
//fall through
case CLN_CONTACTMOVED:
- SetListGroupIcons(GetDlgItem(hwndDlg, IDC_ACTIVE_USERS), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_ACTIVE_USERS, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ SetListGroupIcons(GetDlgItem(hwndDlg, IDC_ACTIVE_USERS), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_ACTIVE_USERS, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
break;
case CLN_OPTIONSCHANGED:
ResetListOptions(GetDlgItem(hwndDlg, IDC_ACTIVE_USERS));
@@ -114,7 +114,7 @@ void DialogConfigActive::notify(HWND hwndDlg, LPARAM lParam) DWORD hitFlags;
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_ACTIVE_USERS, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
- if (hItem == NULL || !(hitFlags & CLCHT_ONITEMEXTRA))
+ if (hItem == nullptr || !(hitFlags & CLCHT_ONITEMEXTRA))
break;
if (nm->iColumn == 2) { // ignore all
@@ -133,7 +133,7 @@ void DialogConfigActive::notify(HWND hwndDlg, LPARAM lParam) iImage = 0;
SetIconsForColumn(GetDlgItem(hwndDlg, IDC_ACTIVE_USERS), hItem, hItemAll, nm->iColumn, iImage);
}
- SetListGroupIcons(GetDlgItem(hwndDlg, IDC_ACTIVE_USERS), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_ACTIVE_USERS, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ SetListGroupIcons(GetDlgItem(hwndDlg, IDC_ACTIVE_USERS), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_ACTIVE_USERS, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
m_instance->changed(hwndDlg);
}
break;
@@ -187,7 +187,7 @@ void DialogConfigActive::load(HWND window) this->InitialiseItem(listview, hItemUnknown, active_users[0].message, active_users[0].status);
}
this->SetAllContactIcons(listview);
- this->SetListGroupIcons(GetDlgItem(window, IDC_ACTIVE_USERS), (HANDLE)SendDlgItemMessage(window, IDC_ACTIVE_USERS, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ this->SetListGroupIcons(GetDlgItem(window, IDC_ACTIVE_USERS), (HANDLE)SendDlgItemMessage(window, IDC_ACTIVE_USERS, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
}
diff --git a/plugins/WinterSpeak/src/DialogConfigEngine.cpp b/plugins/WinterSpeak/src/DialogConfigEngine.cpp index 8914402120..dc6834fe13 100644 --- a/plugins/WinterSpeak/src/DialogConfigEngine.cpp +++ b/plugins/WinterSpeak/src/DialogConfigEngine.cpp @@ -1,12 +1,12 @@ #include "stdafx.h"
#include "DialogConfigEngine.h"
-DialogConfigEngine *DialogConfigEngine::m_instance = 0;
+DialogConfigEngine *DialogConfigEngine::m_instance = nullptr;
//------------------------------------------------------------------------------
// public:
//------------------------------------------------------------------------------
-DialogConfigEngine::DialogConfigEngine(ConfigDatabase &db) : m_db(db), m_test_tts(0)
+DialogConfigEngine::DialogConfigEngine(ConfigDatabase &db) : m_db(db), m_test_tts(nullptr)
{
m_instance = this;
}
@@ -14,7 +14,7 @@ DialogConfigEngine::DialogConfigEngine(ConfigDatabase &db) : m_db(db), m_test_tt //------------------------------------------------------------------------------
DialogConfigEngine::~DialogConfigEngine()
{
- m_instance = 0;
+ m_instance = nullptr;
}
//------------------------------------------------------------------------------
diff --git a/plugins/WinterSpeak/src/MirandaDialog.cpp b/plugins/WinterSpeak/src/MirandaDialog.cpp index 882ffa044f..646b8a198e 100644 --- a/plugins/WinterSpeak/src/MirandaDialog.cpp +++ b/plugins/WinterSpeak/src/MirandaDialog.cpp @@ -20,7 +20,7 @@ WCHAR *MirandaDialog::Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem) { int len = SendDlgItemMessage(hwndDlg, nIDDlgItem, WM_GETTEXTLENGTH, 0, 0);
if (len < 0)
- return NULL;
+ return nullptr;
WCHAR *res = (WCHAR*)mir_alloc((len+1)*sizeof(WCHAR));
memset(res, 0, ((len + 1) * sizeof(WCHAR)));
diff --git a/plugins/WinterSpeak/src/ProtocolInformation.cpp b/plugins/WinterSpeak/src/ProtocolInformation.cpp index 7020210881..1eaa23482b 100644 --- a/plugins/WinterSpeak/src/ProtocolInformation.cpp +++ b/plugins/WinterSpeak/src/ProtocolInformation.cpp @@ -3,7 +3,7 @@ //------------------------------------------------------------------------------
-ProtocolInformation *ProtocolInformation::m_instance = 0;
+ProtocolInformation *ProtocolInformation::m_instance = nullptr;
//------------------------------------------------------------------------------
// public:
@@ -16,12 +16,12 @@ ProtocolInformation::ProtocolInformation() : m_protocol_timeout() //------------------------------------------------------------------------------
ProtocolInformation::~ProtocolInformation()
{
- m_instance = 0;
+ m_instance = nullptr;
// kill all the timers
for (ProtocolTimeoutQueue::const_iterator iter = m_protocol_timeout.begin(); iter != m_protocol_timeout.end(); ++iter)
{
- KillTimer(NULL, (*iter).second);
+ KillTimer(nullptr, (*iter).second);
}
}
@@ -29,7 +29,7 @@ void CALLBACK ProtocolInformation::TimerProc(HWND, UINT, UINT_PTR, DWORD) {
ProtocolTimeout pt = m_instance->m_protocol_timeout.front();
- KillTimer(NULL, pt.second);
+ KillTimer(nullptr, pt.second);
m_instance->m_protocol_timeout.pop_front();
}
@@ -37,21 +37,21 @@ void CALLBACK ProtocolInformation::TimerProc(HWND, UINT, UINT_PTR, DWORD) //------------------------------------------------------------------------------
void ProtocolInformation::disable(const char *protocol)
{
- if (NULL == protocol)
+ if (nullptr == protocol)
{
return;
}
const unsigned int TIMEOUT = 10000;
- unsigned int t = SetTimer(NULL, (UINT_PTR)this, TIMEOUT, TimerProc);
+ unsigned int t = SetTimer(nullptr, (UINT_PTR)this, TIMEOUT, TimerProc);
m_protocol_timeout.push_back(std::make_pair(protocol, t));
}
//------------------------------------------------------------------------------
bool ProtocolInformation::isDisabled(const char *protocol) const
{
- if (NULL == protocol)
+ if (nullptr == protocol)
{
return false;
}
diff --git a/plugins/WinterSpeak/src/SpeakConfig.cpp b/plugins/WinterSpeak/src/SpeakConfig.cpp index b6401b4423..f80716a728 100644 --- a/plugins/WinterSpeak/src/SpeakConfig.cpp +++ b/plugins/WinterSpeak/src/SpeakConfig.cpp @@ -2,7 +2,7 @@ #include "SpeakConfig.h"
-SpeakConfig::SpeakConfig(HINSTANCE instance) : m_instance(instance), m_db(), m_tts(0), m_dialog_engine(m_db), m_dialog_active(m_db)
+SpeakConfig::SpeakConfig(HINSTANCE instance) : m_instance(instance), m_db(), m_tts(nullptr), m_dialog_engine(m_db), m_dialog_active(m_db)
{
// create and configure the tts
SpeechInterface si;
diff --git a/plugins/WinterSpeak/src/SpeechApi40a.cpp b/plugins/WinterSpeak/src/SpeechApi40a.cpp index fbb6851364..d3bf7d2975 100644 --- a/plugins/WinterSpeak/src/SpeechApi40a.cpp +++ b/plugins/WinterSpeak/src/SpeechApi40a.cpp @@ -19,7 +19,7 @@ #include <memory>
//------------------------------------------------------------------------------
-SpeechApi40a::SpeechApi40a() : m_tts_central(0), m_tts_attribs(0), m_state(TextToSpeech::State_Unloaded), m_voice(L""), m_volume(50), m_pitch(50), m_rate(50)
+SpeechApi40a::SpeechApi40a() : m_tts_central(nullptr), m_tts_attribs(nullptr), m_state(TextToSpeech::State_Unloaded), m_voice(L""), m_volume(50), m_pitch(50), m_rate(50)
{
}
@@ -33,13 +33,13 @@ SpeechApi40a::~SpeechApi40a() //------------------------------------------------------------------------------
bool SpeechApi40a::isAvailable()
{
- CoInitialize(NULL);
+ CoInitialize(nullptr);
PITTSENUM pITTSEnum;
bool ret = true;
// create the enumerator
- if (FAILED(CoCreateInstance(CLSID_TTSEnumerator, NULL, CLSCTX_ALL, IID_ITTSEnum, (void**)&pITTSEnum)))
+ if (FAILED(CoCreateInstance(CLSID_TTSEnumerator, nullptr, CLSCTX_ALL, IID_ITTSEnum, (void**)&pITTSEnum)))
{
ret = false;
}
@@ -66,13 +66,13 @@ bool SpeechApi40a::unload() if (m_tts_attribs)
{
m_tts_attribs->Release();
- m_tts_attribs = 0;
+ m_tts_attribs = nullptr;
}
if (m_tts_central)
{
m_tts_central->Release();
- m_tts_central = 0;
+ m_tts_central = nullptr;
}
m_state = TextToSpeech::State_Unloaded;
@@ -101,7 +101,7 @@ bool SpeechApi40a::say(const std::wstring &sentence) SDATA data;
data.dwSize = (DWORD)(sentence.size() * sizeof(WCHAR));
data.pData = (WCHAR *)sentence.c_str();
- m_tts_central->TextData(CHARSET_TEXT, 0, data, NULL, IID_ITTSBufNotifySinkA);
+ m_tts_central->TextData(CHARSET_TEXT, 0, data, nullptr, IID_ITTSBufNotifySinkA);
}
return ret;
@@ -175,17 +175,17 @@ std::vector<std::wstring> SpeechApi40a::getVoices() const {
std::vector<std::wstring> ret;
- PITTSENUM pITTSEnum = NULL;
+ PITTSENUM pITTSEnum = nullptr;
TTSMODEINFO inf;
- CoInitialize(NULL);
+ CoInitialize(nullptr);
- if (FAILED(CoCreateInstance(CLSID_TTSEnumerator, NULL, CLSCTX_ALL, IID_ITTSEnum, (void**)&pITTSEnum)))
+ if (FAILED(CoCreateInstance(CLSID_TTSEnumerator, nullptr, CLSCTX_ALL, IID_ITTSEnum, (void**)&pITTSEnum)))
{
return ret;
}
- while (!pITTSEnum->Next(1, &inf, NULL))
+ while (!pITTSEnum->Next(1, &inf, nullptr))
{
ret.push_back(inf.szModeName);
}
@@ -220,22 +220,22 @@ std::wstring SpeechApi40a::getDescription() //------------------------------------------------------------------------------
bool SpeechApi40a::loadWithVoice(const std::wstring &voice)
{
- CoInitialize(NULL);
+ CoInitialize(nullptr);
PITTSENUM pITTSEnum;
TTSMODEINFO inf;
LPUNKNOWN pAudioDest;
// create the enumerator
- if (FAILED(CoCreateInstance(CLSID_TTSEnumerator, NULL, CLSCTX_ALL, IID_ITTSEnum, (void**)&pITTSEnum)))
+ if (FAILED(CoCreateInstance(CLSID_TTSEnumerator, nullptr, CLSCTX_ALL, IID_ITTSEnum, (void**)&pITTSEnum)))
return false;
// iterate through the voices until we find the right one
- while (!pITTSEnum->Next(1, &inf, NULL))
+ while (!pITTSEnum->Next(1, &inf, nullptr))
if (inf.szModeName == voice)
break;
- if (FAILED(CoCreateInstance(CLSID_MMAudioDest, NULL, CLSCTX_ALL, IID_IAudioMultiMediaDevice, (void**)&pAudioDest)))
+ if (FAILED(CoCreateInstance(CLSID_MMAudioDest, nullptr, CLSCTX_ALL, IID_IAudioMultiMediaDevice, (void**)&pAudioDest)))
{
pITTSEnum->Release();
return false;
diff --git a/plugins/WinterSpeak/src/SpeechApi40aLexicon.cpp b/plugins/WinterSpeak/src/SpeechApi40aLexicon.cpp index 03c960e68a..e1702bde86 100644 --- a/plugins/WinterSpeak/src/SpeechApi40aLexicon.cpp +++ b/plugins/WinterSpeak/src/SpeechApi40aLexicon.cpp @@ -32,7 +32,7 @@ bool SpeechApi40aLexicon::display() return false;
}
- ITTSDialogs *tts_dialogs = 0;
+ ITTSDialogs *tts_dialogs = nullptr;
m_tts_central->QueryInterface(IID_ITTSDialogs, (void**)&tts_dialogs);
@@ -41,7 +41,7 @@ bool SpeechApi40aLexicon::display() return false;
}
- if (NOERROR != tts_dialogs->LexiconDlg(m_window, NULL))
+ if (NOERROR != tts_dialogs->LexiconDlg(m_window, nullptr))
{
return false;
}
diff --git a/plugins/WinterSpeak/src/SpeechApi51.cpp b/plugins/WinterSpeak/src/SpeechApi51.cpp index a674f80b35..d87ea33a53 100644 --- a/plugins/WinterSpeak/src/SpeechApi51.cpp +++ b/plugins/WinterSpeak/src/SpeechApi51.cpp @@ -29,7 +29,7 @@ namespace }
//------------------------------------------------------------------------------
-SpeechApi51::SpeechApi51() : m_sapi(0), m_state(TextToSpeech::State_Unloaded), m_voice(L""), m_volume(50), m_pitch(50), m_rate(50)
+SpeechApi51::SpeechApi51() : m_sapi(nullptr), m_state(TextToSpeech::State_Unloaded), m_voice(L""), m_volume(50), m_pitch(50), m_rate(50)
{
}
@@ -44,12 +44,12 @@ SpeechApi51::~SpeechApi51() //------------------------------------------------------------------------------
bool SpeechApi51::isAvailable()
{
- CoInitialize(NULL);
+ CoInitialize(nullptr);
ISpVoice *sapi;
bool ret = true;
- if (FAILED(CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, reinterpret_cast<void **>(&sapi))))
+ if (FAILED(CoCreateInstance(CLSID_SpVoice, nullptr, CLSCTX_ALL, IID_ISpVoice, reinterpret_cast<void **>(&sapi))))
{
ret = false;
}
@@ -69,9 +69,9 @@ bool SpeechApi51::load() return true;
}
- CoInitialize(NULL);
+ CoInitialize(nullptr);
- if (FAILED(CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, reinterpret_cast<void **>(&m_sapi))))
+ if (FAILED(CoCreateInstance(CLSID_SpVoice, nullptr, CLSCTX_ALL, IID_ISpVoice, reinterpret_cast<void **>(&m_sapi))))
{
return false;
}
@@ -92,7 +92,7 @@ bool SpeechApi51::unload() if (isLoaded())
{
m_sapi->Release();
- m_sapi = 0;
+ m_sapi = nullptr;
}
m_state = TextToSpeech::State_Unloaded;
@@ -123,7 +123,7 @@ bool SpeechApi51::say(const std::wstring &sentence) //mbstowcs(sapi_sentence.get(), output.str().c_str(), output.str().size() + 1);
// speak the sentence
- if (FAILED(m_sapi->Speak(p, SPF_IS_XML | SPF_ASYNC, NULL)))
+ if (FAILED(m_sapi->Speak(p, SPF_IS_XML | SPF_ASYNC, nullptr)))
{
return false;
}
@@ -178,14 +178,14 @@ bool SpeechApi51::setVoice(const std::wstring &voice) // get a voice enumerator
CComPtr<IEnumSpObjectTokens> cpEnum;
- if (FAILED(SpEnumTokens(SPCAT_VOICES, NULL, NULL, &cpEnum)))
+ if (FAILED(SpEnumTokens(SPCAT_VOICES, nullptr, nullptr, &cpEnum)))
{
return false;
}
// iterate through the list till we find a matching voice
ISpObjectToken *voice_token;
- while (S_OK == cpEnum->Next(1, &voice_token, NULL))
+ while (S_OK == cpEnum->Next(1, &voice_token, nullptr))
{
CSpDynamicString voice_str;
@@ -205,18 +205,18 @@ std::vector<std::wstring> SpeechApi51::getVoices() const {
std::vector<std::wstring> ret;
- CoInitialize(NULL);
+ CoInitialize(nullptr);
// get a voice enumerator
CComPtr<IEnumSpObjectTokens> cpEnum;
- if (S_OK != SpEnumTokens(SPCAT_VOICES, NULL, NULL, &cpEnum))
+ if (S_OK != SpEnumTokens(SPCAT_VOICES, nullptr, nullptr, &cpEnum))
{
return ret;
}
// iterate through the voices and add them to the string vector
ISpObjectToken *voice_token;
- while (S_OK == cpEnum->Next(1, &voice_token, NULL))
+ while (S_OK == cpEnum->Next(1, &voice_token, nullptr))
{
CSpDynamicString voice_str;
diff --git a/plugins/WinterSpeak/src/SpeechApi51Lexicon.cpp b/plugins/WinterSpeak/src/SpeechApi51Lexicon.cpp index 1d9bce89ba..8762265b4f 100644 --- a/plugins/WinterSpeak/src/SpeechApi51Lexicon.cpp +++ b/plugins/WinterSpeak/src/SpeechApi51Lexicon.cpp @@ -6,7 +6,7 @@ extern HINSTANCE g_hInst;
//------------------------------------------------------------------------------
-SpeechApi51Lexicon::SpeechApi51Lexicon(HWND window) : m_parent_window(window), m_window(0)
+SpeechApi51Lexicon::SpeechApi51Lexicon(HWND window) : m_parent_window(window), m_window(nullptr)
{
}
diff --git a/plugins/WinterSpeak/src/SpeechInterface.cpp b/plugins/WinterSpeak/src/SpeechInterface.cpp index fa1282a8a8..eba58c079e 100644 --- a/plugins/WinterSpeak/src/SpeechInterface.cpp +++ b/plugins/WinterSpeak/src/SpeechInterface.cpp @@ -16,7 +16,7 @@ SpeechInterface::~SpeechInterface() //------------------------------------------------------------------------------
TextToSpeech * SpeechInterface::createTts(const std::wstring &engine) const
{
- TextToSpeech *tts = 0;
+ TextToSpeech *tts = nullptr;
if (SpeechApi40a::getDescription() == engine)
{
diff --git a/plugins/WinterSpeak/src/UserInformation.cpp b/plugins/WinterSpeak/src/UserInformation.cpp index 63576269e3..e0934a4861 100644 --- a/plugins/WinterSpeak/src/UserInformation.cpp +++ b/plugins/WinterSpeak/src/UserInformation.cpp @@ -47,7 +47,7 @@ std::wstring UserInformation::statusString(MCONTACT user) std::wstring UserInformation::statusModeString(MCONTACT user)
{
WCHAR *status = pcli->pfnGetStatusModeDescription(m_status_info[user], 0);
- if (NULL == status)
+ if (nullptr == status)
return L"";
return status;
@@ -64,7 +64,7 @@ void UserInformation::insertName(std::wstring &str, MCONTACT user) const std::wstring UserInformation::nameString(MCONTACT user) const
{
WCHAR *ret = pcli->pfnGetContactDisplayName(user, 0);
- if (0 == ret)
+ if (nullptr == ret)
return L"";
return TranslateW(ret);
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp index 109887b3ab..daffa20758 100644 --- a/plugins/WinterSpeak/src/main.cpp +++ b/plugins/WinterSpeak/src/main.cpp @@ -5,8 +5,8 @@ HINSTANCE g_hInst; int hLangpack;
DWORD g_mirandaVersion;
-SpeakConfig *g_speak_config = 0;
-SpeakAnnounce *g_speak_announce = 0;
+SpeakConfig *g_speak_config = nullptr;
+SpeakAnnounce *g_speak_announce = nullptr;
HANDLE g_dialog_options_initialise;
HANDLE g_event_status_change;
HANDLE g_event_message_added;
@@ -145,7 +145,7 @@ extern "C" __declspec(dllexport) int Unload(void) if (g_speak_config)
{
delete g_speak_config;
- g_speak_config = 0;
+ g_speak_config = nullptr;
}
if (g_speak_announce)
@@ -155,7 +155,7 @@ extern "C" __declspec(dllexport) int Unload(void) UnhookEvent(g_protocol_ack);
delete g_speak_announce;
- g_speak_announce = 0;
+ g_speak_announce = nullptr;
}
return 0;
|