[libcamera-devel] cam: options: Fix coding style issue related to templates

Message ID 20190212222912.9089-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit 0c0b1e4dbe2b436a60c26cbaa68556988bcbf005
Headers show
Series
  • [libcamera-devel] cam: options: Fix coding style issue related to templates
Related show

Commit Message

Laurent Pinchart Feb. 12, 2019, 10:29 p.m. UTC
Our coding style doesn't add a space after the template keyword. Fix the
source code accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/cam/options.cpp | 10 +++++-----
 src/cam/options.h   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Niklas Söderlund Feb. 13, 2019, 10:30 a.m. UTC | #1
Hi Laurent,

Thanks for your patch.

On 2019-02-13 00:29:12 +0200, Laurent Pinchart wrote:
> Our coding style doesn't add a space after the template keyword. Fix the
> source code accordingly.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/cam/options.cpp | 10 +++++-----
>  src/cam/options.h   |  2 +-
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/cam/options.cpp b/src/cam/options.cpp
> index eb59376fa459..655aa36bb9c9 100644
> --- a/src/cam/options.cpp
> +++ b/src/cam/options.cpp
> @@ -39,25 +39,25 @@ const char *Option::typeName() const
>   * OptionBase<T>
>   */
>  
> -template <typename T>
> +template<typename T>
>  bool OptionsBase<T>::valid() const
>  {
>  	return !values_.empty();
>  }
>  
> -template <typename T>
> +template<typename T>
>  bool OptionsBase<T>::isSet(const T &opt) const
>  {
>  	return values_.find(opt) != values_.end();
>  }
>  
> -template <typename T>
> +template<typename T>
>  const OptionValue &OptionsBase<T>::operator[](const T &opt) const
>  {
>  	return values_.find(opt)->second;
>  }
>  
> -template <typename T>
> +template<typename T>
>  bool OptionsBase<T>::parseValue(const T &opt, const Option &option,
>  				const char *optarg)
>  {
> @@ -100,7 +100,7 @@ bool OptionsBase<T>::parseValue(const T &opt, const Option &option,
>  	return true;
>  }
>  
> -template <typename T>
> +template<typename T>
>  void OptionsBase<T>::clear()
>  {
>  	values_.clear();
> diff --git a/src/cam/options.h b/src/cam/options.h
> index 2d3aa50b5051..745f4a4a3a43 100644
> --- a/src/cam/options.h
> +++ b/src/cam/options.h
> @@ -41,7 +41,7 @@ struct Option {
>  	const char *typeName() const;
>  };
>  
> -template <typename T>
> +template<typename T>
>  class OptionsBase
>  {
>  public:
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/cam/options.cpp b/src/cam/options.cpp
index eb59376fa459..655aa36bb9c9 100644
--- a/src/cam/options.cpp
+++ b/src/cam/options.cpp
@@ -39,25 +39,25 @@  const char *Option::typeName() const
  * OptionBase<T>
  */
 
-template <typename T>
+template<typename T>
 bool OptionsBase<T>::valid() const
 {
 	return !values_.empty();
 }
 
-template <typename T>
+template<typename T>
 bool OptionsBase<T>::isSet(const T &opt) const
 {
 	return values_.find(opt) != values_.end();
 }
 
-template <typename T>
+template<typename T>
 const OptionValue &OptionsBase<T>::operator[](const T &opt) const
 {
 	return values_.find(opt)->second;
 }
 
-template <typename T>
+template<typename T>
 bool OptionsBase<T>::parseValue(const T &opt, const Option &option,
 				const char *optarg)
 {
@@ -100,7 +100,7 @@  bool OptionsBase<T>::parseValue(const T &opt, const Option &option,
 	return true;
 }
 
-template <typename T>
+template<typename T>
 void OptionsBase<T>::clear()
 {
 	values_.clear();
diff --git a/src/cam/options.h b/src/cam/options.h
index 2d3aa50b5051..745f4a4a3a43 100644
--- a/src/cam/options.h
+++ b/src/cam/options.h
@@ -41,7 +41,7 @@  struct Option {
 	const char *typeName() const;
 };
 
-template <typename T>
+template<typename T>
 class OptionsBase
 {
 public: