[RFC PATCH v1 04/12] apps: lc-compliance: Remove redundant getter call

Paul Elder paul.elder at ideasonboard.com
Thu Jan 9 23:16:06 CET 2025


On Fri, Dec 20, 2024 at 03:08:20PM +0000, Barnabás Pőcze wrote:
> Smart pointers overload `operator->()`, no reason to use `get()`.
> 
> Signed-off-by: Barnabás Pőcze <pobrn at protonmail.com>

Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>

> ---
>  src/apps/lc-compliance/main.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/apps/lc-compliance/main.cpp b/src/apps/lc-compliance/main.cpp
> index 98f2573d0..cdd0bd515 100644
> --- a/src/apps/lc-compliance/main.cpp
> +++ b/src/apps/lc-compliance/main.cpp
> @@ -45,7 +45,7 @@ class ThrowListener : public testing::EmptyTestEventListener
>  static void listCameras(CameraManager *cm)
>  {
>  	for (const std::shared_ptr<Camera> &cam : cm->cameras())
> -		std::cout << "- " << cam.get()->id() << std::endl;
> +		std::cout << "- " << cam->id() << std::endl;
>  }
>  
>  static int initCamera(CameraManager *cm, OptionsParser::Options options)
> -- 
> 2.47.1
> 
> 


More information about the libcamera-devel mailing list