@@ -599,27 +599,29 @@ class JobPusherObserver : public la::avdecc::controller::Controller::DefaultedOb
599599{
600600public:
601601 JobPusherObserver (la::avdecc::ExecutorManager::ExecutorWrapper* executor)
602- : _executor( executor)
602+ : _executor{ executor }
603603 {
604604 }
605605 virtual void onEntityOnline (la::avdecc::controller::Controller const * const /* controller */ , la::avdecc::controller::ControlledEntity const * const /* entity*/ ) noexcept override
606606 {
607607 _executor->pushJob (
608- [this ]()
608+ []()
609609 {
610+ // Empty, just to force a job in the queue
610611 });
611612 }
612613
613614 virtual void onEntityOffline (la::avdecc::controller::Controller const * const /* controller */ , la::avdecc::controller::ControlledEntity const * const /* entity */ ) noexcept override
614615 {
615616 _executor->pushJob (
616- [this ]()
617+ []()
617618 {
619+ // Empty, just to force a job in the queue
618620 });
619621 }
620622
621623private:
622- la::avdecc::ExecutorManager::ExecutorWrapper* _executor;
624+ la::avdecc::ExecutorManager::ExecutorWrapper* const _executor{ nullptr } ;
623625};
624626} // namespace
625627
@@ -633,7 +635,7 @@ TEST(ControllerEntity, PushJobToExecutorWhileLoadVirtualEntities)
633635
634636 // Verify if load does not dead lock
635637 auto const future = std::async (std::launch::async,
636- [this , &controller, flags]()
638+ [&controller, flags]()
637639 {
638640 auto const [error, message] = controller->loadVirtualEntityFromJson (" data/SimpleEntity.json" , flags);
639641 EXPECT_EQ (la::avdecc::jsonSerializer::DeserializationError::NoError, error);
@@ -657,7 +659,7 @@ TEST(ControllerEntity, PushJobToExecutorWhileUnloadVirtualEntities)
657659
658660 // Verify if unload does not dead lock
659661 auto const future = std::async (std::launch::async,
660- [this , &controller, flags ]()
662+ [&controller]()
661663 {
662664 controller->unloadVirtualEntity (la::avdecc::UniqueIdentifier{ 0x001B92FFFF000001 });
663665 });
@@ -679,7 +681,7 @@ TEST(ControllerEntity, PushJobToExecutorWhileRefreshVirtualEntities)
679681
680682 // Verify if refresh does not dead lock
681683 auto const future = std::async (std::launch::async,
682- [this , &controller, flags ]()
684+ [&controller]()
683685 {
684686 controller->refreshEntity (la::avdecc::UniqueIdentifier{ 0x001B92FFFF000001 });
685687 });
0 commit comments