From f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Jun 2018 12:46:15 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-nullptr=20pa?= =?UTF-8?q?ss.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer. --- src/extension/timer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/extension/timer.cpp') diff --git a/src/extension/timer.cpp b/src/extension/timer.cpp index b32c04f30..5fb727409 100644 --- a/src/extension/timer.cpp +++ b/src/extension/timer.cpp @@ -20,8 +20,8 @@ namespace Extension { #define TIMER_SCALE_VALUE 20 -ExpirationTimer * ExpirationTimer::timer_list = NULL; -ExpirationTimer * ExpirationTimer::idle_start = NULL; +ExpirationTimer * ExpirationTimer::timer_list = nullptr; +ExpirationTimer * ExpirationTimer::idle_start = nullptr; long ExpirationTimer::timeout = 240; bool ExpirationTimer::timer_started = false; @@ -38,7 +38,7 @@ ExpirationTimer::ExpirationTimer (Extension * in_extension): extension(in_extension) { /* Fix Me! */ - if (timer_list == NULL) { + if (timer_list == nullptr) { next = this; timer_list = this; } else { @@ -86,8 +86,8 @@ ExpirationTimer::~ExpirationTimer(void) } else { /* If we're the only entry in the list, the list needs to go to NULL */ - timer_list = NULL; - idle_start = NULL; + timer_list = nullptr; + idle_start = nullptr; } return; @@ -151,7 +151,7 @@ ExpirationTimer::idle_func (void) // std::cout << "Idle func pass: " << idle_cnt++ << " timer list: " << timer_list << std::endl; /* see if this is the last */ - if (timer_list == NULL) { + if (timer_list == nullptr) { timer_started = false; return false; } @@ -162,7 +162,7 @@ ExpirationTimer::idle_func (void) } /* see if this is the last */ - if (timer_list == NULL) { + if (timer_list == nullptr) { timer_started = false; return false; } -- cgit v1.2.3