From 320fdeb9d8355d3c361d5c6d60de8afc64501af9 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 30 Aug 2023 16:48:10 +1000 Subject: Use a service locator instead of passing around subsets of drivers between FSMs --- src/ui/include/wheel_encoder.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/include/wheel_encoder.hpp') diff --git a/src/ui/include/wheel_encoder.hpp b/src/ui/include/wheel_encoder.hpp index c49e5929..fcac5edd 100644 --- a/src/ui/include/wheel_encoder.hpp +++ b/src/ui/include/wheel_encoder.hpp @@ -17,7 +17,7 @@ namespace ui { class TouchWheelEncoder { public: - explicit TouchWheelEncoder(std::weak_ptr wheel); + explicit TouchWheelEncoder(std::unique_ptr wheel); auto Read(lv_indev_data_t* data) -> void; auto registration() -> lv_indev_t* { return registration_; } @@ -27,7 +27,7 @@ class TouchWheelEncoder { lv_indev_t* registration_; lv_key_t last_key_; - std::weak_ptr wheel_; + std::unique_ptr wheel_; }; } // namespace ui -- cgit v1.2.3