diff options
author | Hirokazu Honda <hiroh@chromium.org> | 2021-03-24 16:07:54 +0900 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-03-25 00:45:26 +0200 |
commit | 14b262dacf363cc31dc4af64af5893bde017479f (patch) | |
tree | c9e1d4acf54a10ae85816f1fb3b328b12abe5156 /test/message.cpp | |
parent | 9538ce4cc65af347f457dee52ae6344119cc0be2 (diff) |
android: CameraDevice: Return const shared_ptr& by camera()
CameraDevice::camera() originally returns shared_ptr. It is
mandatory to make a copy by calling camera() in this way. There
is no need of copying if a caller needs the reference of the
camera like const shared_ptr<Camera> &cam = camera(). That is, it
is a caller that copying is required. This changes the return
type of camera() to const shared_ptr&, so that we are able to
reduce one redundant copy in the above case.
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>
Diffstat (limited to 'test/message.cpp')
0 files changed, 0 insertions, 0 deletions