summaryrefslogtreecommitdiff
path: root/plugins/MirFox/src/MirFoxCommons
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/MirFox/src/MirFoxCommons
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/MirFox/src/MirFoxCommons')
-rw-r--r--plugins/MirFox/src/MirFoxCommons/MirFoxCommons_logger.cpp4
-rw-r--r--plugins/MirFox/src/MirFoxCommons/MirFoxCommons_messageQueueBySM.cpp6
-rw-r--r--plugins/MirFox/src/MirFoxCommons/MirFoxCommons_sharedMemory.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_logger.cpp b/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_logger.cpp
index eec0c8b196..cb388d0681 100644
--- a/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_logger.cpp
+++ b/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_logger.cpp
@@ -5,7 +5,7 @@
MFLogger::MFLogger()
{
- logFunction = NULL;
+ logFunction = nullptr;
memcpy(m_prefix, L" ", PREFIX_SIZE * sizeof(m_prefix[0]));
}
@@ -21,7 +21,7 @@ void MFLogger::set6CharsPrefix(const wchar_t* prefix){
}
void MFLogger::releaseLogger(){
- logFunction = NULL;
+ logFunction = nullptr;
DeleteCriticalSection(&logCs);
}
diff --git a/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_messageQueueBySM.cpp b/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_messageQueueBySM.cpp
index 96ac041006..10fe3c3763 100644
--- a/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_messageQueueBySM.cpp
+++ b/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_messageQueueBySM.cpp
@@ -38,7 +38,7 @@ MessageQueueUtils::MessageQueueUtils()
{
unloadedMQProcessId = -1;
//one mutex per all messagequeues schould be enough
- smMutex = CreateMutex(NULL, FALSE, L"Local\\mirfoxMqMirSm");
+ smMutex = CreateMutex(nullptr, FALSE, L"Local\\mirfoxMqMirSm");
}
@@ -114,7 +114,7 @@ MessageQueueUtils::unloadMessageQueue(uint16_t unloadedMQProcessId)
this->unloadedMQProcessId = unloadedMQProcessId;
if (mqMirSm){
delete mqMirSm;
- mqMirSm = NULL;
+ mqMirSm = nullptr;
} else {
logger->log(L"MessageQueueUtils::unloadMessageQueue - mqMirSm was NULL");
}
@@ -231,7 +231,7 @@ MessageQueueUtils::sendMessage(int clientRecordId, char menuItemType, char userA
getMqName(clientRecordId).c_str(),
boost::interprocess::read_write);
- if (sm == NULL){
+ if (sm == nullptr){
logger->log(L"MessageQueueUtils::sendMessage (sm mode) sm == NULL");
return; //error
}
diff --git a/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_sharedMemory.cpp b/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_sharedMemory.cpp
index 18fafa241e..5696e7695a 100644
--- a/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_sharedMemory.cpp
+++ b/plugins/MirFox/src/MirFoxCommons/MirFoxCommons_sharedMemory.cpp
@@ -1230,7 +1230,7 @@ time_t
SharedMemoryUtils::mfGetCurrentTimestamp()
{
- time_t currentTimestamp = time(NULL);
+ time_t currentTimestamp = time(nullptr);
//logger->log_dp(L"mfGetCurrentTimestamp() [" SCNuPTR L"]", currentTimestamp);
return currentTimestamp;
@@ -1369,7 +1369,7 @@ SharedMemoryUtils::isTokenOnList(std::wstring& token, std::wstring& tokensList)
void
SharedMemoryUtils::unloadFromCSM(uint16_t processCsmId)
{
- if (csm == NULL){
+ if (csm == nullptr){
logger->log(L"SharedMemoryUtils::unloadFromCSM: csm == NULL , return");
return;
}