| 79 | } |
| 80 | |
| 81 | std::vector<std::shared_ptr<Device>> findDevices(const std::function<bool(const std::shared_ptr<Device>&)>& filterFunction) { |
| 82 | auto scoped_mutex = mutex.asScopedLock(); |
| 83 | scoped_mutex.lock(); |
| 84 | |
| 85 | auto devices_view = getDevices() | std::views::filter([&filterFunction](auto& device) { |
| 86 | return filterFunction(device); |
| 87 | }); |
| 88 | return toVector(devices_view); |
| 89 | } |
| 90 | |
| 91 | std::shared_ptr<Device> findDevice(const std::function<bool(const std::shared_ptr<Device>&)>& filterFunction) { |
| 92 | auto scoped_mutex = mutex.asScopedLock(); |
no test coverage detected