From 0990783878c4de8a0b6c7df42b8507136784915c Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Wed, 1 May 2024 08:09:06 +0000 Subject: [PATCH] feat support default Timer::Ptr = nullptr --- src/sled/timer/timer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sled/timer/timer.h b/src/sled/timer/timer.h index 97a437b..1f0f488 100644 --- a/src/sled/timer/timer.h +++ b/src/sled/timer/timer.h @@ -17,16 +17,17 @@ typedef uint32_t TimerGeneration; class Timer; struct TimerThreadDeleter { + TimerThreadDeleter() = default; TimerThreadDeleter(TaskQueueBase *owner); inline void operator()(Timer *timer); private: - TaskQueueBase *owner_; + TaskQueueBase *owner_ = nullptr; }; class Timer { public: - using Ptr= std::unique_ptr; + using Ptr = std::unique_ptr; using OnExpired = std::function()>; Timer(const Timer &) = delete;