android: CameraDevice: Manage staticMetadata_ with std::unique_ptr

staticMetadata_ in CameraDevice is not necessary to be a raw
pointer. This reduces the manual new/delete code by changing the
type to std::unique_ptr.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Hirokazu Honda 2021-03-24 16:07:56 +09:00 committed by Laurent Pinchart
parent 17a6e78e00
commit dca709c44a
2 changed files with 5 additions and 11 deletions

View file

@ -113,7 +113,7 @@ private:
std::shared_ptr<libcamera::Camera> camera_;
std::unique_ptr<libcamera::CameraConfiguration> config_;
CameraMetadata *staticMetadata_;
std::unique_ptr<CameraMetadata> staticMetadata_;
std::map<unsigned int, const CameraMetadata *> requestTemplates_;
const camera3_callback_ops_t *callbacks_;