We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2f5b79 commit d3f70f6Copy full SHA for d3f70f6
src/system/tests/TestEventLoopHandler.cpp
@@ -50,12 +50,12 @@ class TestEventLoopHandler : public ::testing::Test
50
template <class Lambda>
51
static std::function<void()> Schedule(Timeout delay, Lambda lambda)
52
{
53
- auto * function = new std::function<void()>(lambda);
54
System::TimerCompleteCallback callback = [](System::Layer * layer, void * ctx) {
55
auto * function = static_cast<std::function<void()> *>(ctx);
56
(*function)();
57
delete function;
58
};
+ auto * function = new std::function<void()>(lambda);
59
SystemLayer().StartTimer(delay, callback, function);
60
return [=] { SystemLayer().CancelTimer(callback, function); };
61
}
0 commit comments