Update src/io/simulator/simulator.hpp

Co-authored-by: gvolfing <107616712+gvolfing@users.noreply.github.com>
This commit is contained in:
Tyler Neely 2022-12-05 15:26:18 +01:00 committed by GitHub
parent 747b8a21cd
commit 2a81ce5640
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,8 +51,7 @@ class Simulator {
SimulatorStats Stats() { return simulator_handle_->Stats(); }
std::function<bool()> GetSimulatorTickClosure() {
std::shared_ptr<SimulatorHandle> handle_copy = simulator_handle_;
std::function<bool()> tick_closure = [handle_copy] { return handle_copy->MaybeTickSimulator(); };
std::function<bool()> tick_closure = [handle_copy = simulator_handle_] { return handle_copy->MaybeTickSimulator(); };
return tick_closure;
}
};