mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 16:45:07 +03:00
libcamera: camera_manager: Use std::unique_ptr to store event dispatcher
The CameraManager takes ownership of the dispatcher passed to the setEventDispatcher() function. Enforces this by using std::unique_ptr<>. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
0908669834
commit
32bf7ef239
2 changed files with 9 additions and 7 deletions
|
@ -29,7 +29,7 @@ public:
|
|||
|
||||
static CameraManager *instance();
|
||||
|
||||
void setEventDispatcher(EventDispatcher *dispatcher);
|
||||
void setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher);
|
||||
EventDispatcher *eventDispatcher();
|
||||
|
||||
private:
|
||||
|
@ -41,7 +41,7 @@ private:
|
|||
std::unique_ptr<DeviceEnumerator> enumerator_;
|
||||
std::vector<PipelineHandler *> pipes_;
|
||||
|
||||
EventDispatcher *dispatcher_;
|
||||
std::unique_ptr<EventDispatcher> dispatcher_;
|
||||
};
|
||||
|
||||
} /* namespace libcamera */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue