[libcamera-devel,v3,05/14] libcamera: controls: Rename enumerate values
diff mbox series

Message ID 20201021143635.22846-6-jacopo@jmondi.org
State Accepted
Headers show
Series
  • libcamera: Introduce draft controls
Related show

Commit Message

Jacopo Mondi Oct. 21, 2020, 2:36 p.m. UTC
Rename the enumeration of supported values with the suffix "Enum"
in place of "Values" to prepare to re-use the suffix "Values"
for the vector of Control's value introduced by the next patch.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 utils/gen-controls.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Kieran Bingham Oct. 21, 2020, 2:53 p.m. UTC | #1
On 21/10/2020 15:36, Jacopo Mondi wrote:
> Rename the enumeration of supported values with the suffix "Enum"
> in place of "Values" to prepare to re-use the suffix "Values"
> for the vector of Control's value introduced by the next patch.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

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

> ---
>  utils/gen-controls.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/utils/gen-controls.py b/utils/gen-controls.py
> index 93cb3885c3da..bf681503f86a 100755
> --- a/utils/gen-controls.py
> +++ b/utils/gen-controls.py
> @@ -24,9 +24,9 @@ def format_description(description):
>  
>  def generate_cpp(controls):
>      enum_doc_start_template = string.Template('''/**
> - * \\enum ${name}Values
> + * \\enum ${name}Enum
>   * \\brief Supported ${name} values''')
> -    enum_doc_value_template = string.Template(''' * \\var ${name}Values::${value}
> +    enum_doc_value_template = string.Template(''' * \\var ${name}Enum::${value}
>  ${description}''')
>      doc_template = string.Template('''/**
>   * \\var ${name}
> @@ -98,7 +98,7 @@ ${description}
>  
>  
>  def generate_h(controls):
> -    enum_template_start = string.Template('''enum ${name}Values {''')
> +    enum_template_start = string.Template('''enum ${name}Enum {''')
>      enum_value_template = string.Template('''\t${name} = ${value},''')
>      template = string.Template('''extern const Control<${type}> ${name};''')
>  
>
Laurent Pinchart Oct. 22, 2020, 2:43 a.m. UTC | #2
Hi Jacopo,

Thank you for the patch.

On Wed, Oct 21, 2020 at 04:36:26PM +0200, Jacopo Mondi wrote:
> Rename the enumeration of supported values with the suffix "Enum"
> in place of "Values" to prepare to re-use the suffix "Values"
> for the vector of Control's value introduced by the next patch.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
>  utils/gen-controls.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/utils/gen-controls.py b/utils/gen-controls.py
> index 93cb3885c3da..bf681503f86a 100755
> --- a/utils/gen-controls.py
> +++ b/utils/gen-controls.py
> @@ -24,9 +24,9 @@ def format_description(description):
>  
>  def generate_cpp(controls):
>      enum_doc_start_template = string.Template('''/**
> - * \\enum ${name}Values
> + * \\enum ${name}Enum
>   * \\brief Supported ${name} values''')
> -    enum_doc_value_template = string.Template(''' * \\var ${name}Values::${value}
> +    enum_doc_value_template = string.Template(''' * \\var ${name}Enum::${value}
>  ${description}''')
>      doc_template = string.Template('''/**
>   * \\var ${name}
> @@ -98,7 +98,7 @@ ${description}
>  
>  
>  def generate_h(controls):
> -    enum_template_start = string.Template('''enum ${name}Values {''')
> +    enum_template_start = string.Template('''enum ${name}Enum {''')
>      enum_value_template = string.Template('''\t${name} = ${value},''')
>      template = string.Template('''extern const Control<${type}> ${name};''')
>

Patch
diff mbox series

diff --git a/utils/gen-controls.py b/utils/gen-controls.py
index 93cb3885c3da..bf681503f86a 100755
--- a/utils/gen-controls.py
+++ b/utils/gen-controls.py
@@ -24,9 +24,9 @@  def format_description(description):
 
 def generate_cpp(controls):
     enum_doc_start_template = string.Template('''/**
- * \\enum ${name}Values
+ * \\enum ${name}Enum
  * \\brief Supported ${name} values''')
-    enum_doc_value_template = string.Template(''' * \\var ${name}Values::${value}
+    enum_doc_value_template = string.Template(''' * \\var ${name}Enum::${value}
 ${description}''')
     doc_template = string.Template('''/**
  * \\var ${name}
@@ -98,7 +98,7 @@  ${description}
 
 
 def generate_h(controls):
-    enum_template_start = string.Template('''enum ${name}Values {''')
+    enum_template_start = string.Template('''enum ${name}Enum {''')
     enum_value_template = string.Template('''\t${name} = ${value},''')
     template = string.Template('''extern const Control<${type}> ${name};''')