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/FTPFileYM/src/deletetimer.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/FTPFileYM/src/deletetimer.cpp')
-rw-r--r-- | plugins/FTPFileYM/src/deletetimer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/FTPFileYM/src/deletetimer.cpp b/plugins/FTPFileYM/src/deletetimer.cpp index 624d483553..fe642e8a83 100644 --- a/plugins/FTPFileYM/src/deletetimer.cpp +++ b/plugins/FTPFileYM/src/deletetimer.cpp @@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h"
-DeleteTimer *DeleteTimer::instance = NULL;
+DeleteTimer *DeleteTimer::instance = nullptr;
DeleteTimer &deleteTimer = DeleteTimer::getInstance();
extern Options &opt;
@@ -39,13 +39,13 @@ void DeleteTimer::deinit() void DeleteTimer::start()
{
if (!timerId)
- timerId = SetTimer(NULL, 0, 1000 * 60 * 5, (TIMERPROC)AutoDeleteTimerProc);
+ timerId = SetTimer(nullptr, 0, 1000 * 60 * 5, (TIMERPROC)AutoDeleteTimerProc);
}
void DeleteTimer::stop()
{
if (timerId) {
- KillTimer(NULL, timerId);
+ KillTimer(nullptr, timerId);
timerId = 0;
}
}
@@ -55,9 +55,9 @@ void CALLBACK DeleteTimer::AutoDeleteTimerProc(HWND, UINT, UINT_PTR, DWORD) mir_cslock lock(DBEntry::mutexDB);
DBEntry *entry = DBEntry::getFirst();
- while (entry != NULL) {
- if (entry->m_deleteTS > 0 && entry->m_deleteTS < time(NULL)) {
- DeleteJob *job = new DeleteJob(new DBEntry(entry), NULL);
+ while (entry != nullptr) {
+ if (entry->m_deleteTS > 0 && entry->m_deleteTS < time(nullptr)) {
+ DeleteJob *job = new DeleteJob(new DBEntry(entry), nullptr);
job->start();
}
|