[libcamera-devel] [PATCH 01/30] cam: options: Make KeyValueParser::usage() private

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Jul 12 15:29:36 CEST 2021



On 07/07/2021 03:19, Laurent Pinchart wrote:
> The KeyValueParser::usage() function is meant to be called from an
> OptionsParser or another KeyValueParser only. Make it private, and set
> the OptionsParser class as a friend of the KeyValueParser class.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> ---
>  src/cam/options.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/cam/options.h b/src/cam/options.h
> index f02eeca2eef9..d0defb4bd665 100644
> --- a/src/cam/options.h
> +++ b/src/cam/options.h
> @@ -79,9 +79,11 @@ public:
>  		       OptionArgument argument = ArgumentNone);
>  
>  	virtual Options parse(const char *arguments);
> +
> +private:
> +	friend class OptionsParser;
>  	void usage(int indent);
>  
> -private:
>  	std::map<std::string, Option> optionsMap_;
>  };
>  
> 


More information about the libcamera-devel mailing list