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/src/ProtocolInformation.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/WinterSpeak/src/ProtocolInformation.cpp')
-rw-r--r-- | plugins/WinterSpeak/src/ProtocolInformation.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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;
}
|