libcamera: camera_sensor: Store subdevice in std::unique_ptr
Avoid the need for a manual delete in the destructor by using a unique pointer. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#ifndef __LIBCAMERA_CAMERA_SENSOR_H__
|
||||
#define __LIBCAMERA_CAMERA_SENSOR_H__
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -68,7 +69,7 @@ protected:
|
||||
|
||||
private:
|
||||
const MediaEntity *entity_;
|
||||
V4L2Subdevice *subdev_;
|
||||
std::unique_ptr<V4L2Subdevice> subdev_;
|
||||
std::string model_;
|
||||
|
||||
std::vector<unsigned int> mbusCodes_;
|
||||
|
||||
Reference in New Issue
Block a user