android: Pass Camera shared pointer to CameraProxy by const reference
The CameraProxy is constructed with a Camera instance passed through a shared pointer. It forwards it to the CameraDevice constructor, which takes a reference used for the sole purpose of making an internal copy of the shared pointer. Both constructors can thus take a const reference instead of a value or a mutable reference. This optimises the constructors slightly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -19,7 +19,7 @@ class ThreadRpc;
|
||||
class CameraProxy
|
||||
{
|
||||
public:
|
||||
CameraProxy(unsigned int id, std::shared_ptr<libcamera::Camera> camera);
|
||||
CameraProxy(unsigned int id, const std::shared_ptr<libcamera::Camera> &camera);
|
||||
~CameraProxy();
|
||||
|
||||
int open(const hw_module_t *hardwareModule);
|
||||
|
||||
Reference in New Issue
Block a user