aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/eventLoop/EventLoopTimer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/eventLoop/EventLoopTimer.cpp')
-rw-r--r--src/managers/eventLoop/EventLoopTimer.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/managers/eventLoop/EventLoopTimer.cpp b/src/managers/eventLoop/EventLoopTimer.cpp
index 5ece1cac..dbb405e5 100644
--- a/src/managers/eventLoop/EventLoopTimer.cpp
+++ b/src/managers/eventLoop/EventLoopTimer.cpp
@@ -2,10 +2,8 @@
#include <limits>
#include "EventLoopManager.hpp"
-CEventLoopTimer::CEventLoopTimer(std::optional<std::chrono::system_clock::duration> timeout, std::function<void(std::shared_ptr<CEventLoopTimer> self, void* data)> cb_,
- void* data_) :
- cb(cb_),
- data(data_) {
+CEventLoopTimer::CEventLoopTimer(std::optional<std::chrono::system_clock::duration> timeout, std::function<void(SP<CEventLoopTimer> self, void* data)> cb_, void* data_) :
+ cb(cb_), data(data_) {
if (!timeout.has_value())
expires.reset();
@@ -40,7 +38,7 @@ bool CEventLoopTimer::cancelled() {
return wasCancelled;
}
-void CEventLoopTimer::call(std::shared_ptr<CEventLoopTimer> self) {
+void CEventLoopTimer::call(SP<CEventLoopTimer> self) {
expires.reset();
cb(self, data);
}