[libcamera-devel] [PATCH 22/30] cam: Make CamApp::cameraName() static
Kieran Bingham
kieran.bingham at ideasonboard.com
Mon Jul 12 17:50:01 CEST 2021
On 07/07/2021 03:19, Laurent Pinchart wrote:
> The CamApp::cameraName() doesn't need to access any member of the CamApp
> class. Make is static. While at is, drop an unneded const from the
s/is/it/
/unneded/unneeded/
> return value.
Hrm ... if this was the return value being const I would have expected
const std::string.
Is this const supposed to be declaring the member function as const on
the class (not modifying the class) and perhaps misplaced?
Either-way,
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/cam/main.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/cam/main.cpp b/src/cam/main.cpp
> index 19ed9837cf4f..03e62f305f24 100644
> --- a/src/cam/main.cpp
> +++ b/src/cam/main.cpp
> @@ -44,7 +44,7 @@ private:
> int infoConfiguration();
> int run();
>
> - std::string const cameraName(const Camera *camera);
> + static std::string cameraName(const Camera *camera);
>
> static CamApp *app_;
> OptionsParser::Options options_;
> @@ -319,7 +319,7 @@ int CamApp::run()
> return 0;
> }
>
> -std::string const CamApp::cameraName(const Camera *camera)
> +std::string CamApp::cameraName(const Camera *camera)
> {
> const ControlList &props = camera->properties();
> bool addModel = true;
>
More information about the libcamera-devel
mailing list