Skip to content

Commit

Permalink
Avoid gcc shadow warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ksperling-apple committed Jul 23, 2024
1 parent 09ed48d commit f1b152b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/system/tests/TestEventLoopHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ class TestEventLoopHandler : public ::testing::Test
template <class Lambda>
static std::function<void()> Schedule(Timeout delay, Lambda lambda)
{
auto * function = new std::function<void()>(lambda);
System::TimerCompleteCallback callback = [](System::Layer * layer, void * ctx) {
auto * function = static_cast<std::function<void()> *>(ctx);
(*function)();
delete function;
};
auto * function = new std::function<void()>(lambda);
SystemLayer().StartTimer(delay, callback, function);
return [=] { SystemLayer().CancelTimer(callback, function); };
}
Expand Down

0 comments on commit f1b152b

Please sign in to comment.