[libcamera-devel] [PATCH 2/3] libcamera: signal: Fix coding style issues

Niklas Söderlund niklas.soderlund at ragnatech.se
Wed Feb 13 11:46:21 CET 2019


Hi Laurent,

Thanks for your patch.

On 2019-02-13 00:37:01 +0200, Laurent Pinchart wrote:
> Fix issues reported by checkstyle.py in preparation for further changes.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

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

> ---
> Changes since v1:
> 
> - Don't add a space after the template keyword
> ---
>  include/libcamera/signal.h | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h
> index c375b0a878af..85dc481d6957 100644
> --- a/include/libcamera/signal.h
> +++ b/include/libcamera/signal.h
> @@ -34,28 +34,28 @@ template<typename T, typename... Args>
>  class SlotMember : public SlotBase<Args...>
>  {
>  public:
> -	SlotMember(T *obj, void(T::*func)(Args...))
> +	SlotMember(T *obj, void (T::*func)(Args...))
>  		: SlotBase<Args...>(obj), func_(func) { }
>  
>  	void invoke(Args... args) { (static_cast<T *>(this->obj_)->*func_)(args...); }
>  
>  private:
>  	friend class Signal<Args...>;
> -	void(T::*func_)(Args...);
> +	void (T::*func_)(Args...);
>  };
>  
>  template<typename... Args>
>  class SlotStatic : public SlotBase<Args...>
>  {
>  public:
> -	SlotStatic(void(*func)(Args...))
> +	SlotStatic(void (*func)(Args...))
>  		: SlotBase<Args...>(nullptr), func_(func) { }
>  
>  	void invoke(Args... args) { (*func_)(args...); }
>  
>  private:
>  	friend class Signal<Args...>;
> -	void(*func_)(Args...);
> +	void (*func_)(Args...);
>  };
>  
>  template<typename... Args>
> @@ -70,12 +70,12 @@ public:
>  	}
>  
>  	template<typename T>
> -	void connect(T *object, void(T::*func)(Args...))
> +	void connect(T *object, void (T::*func)(Args...))
>  	{
>  		slots_.push_back(new SlotMember<T, Args...>(object, func));
>  	}
>  
> -	void connect(void(*func)(Args...))
> +	void connect(void (*func)(Args...))
>  	{
>  		slots_.push_back(new SlotStatic<Args...>(func));
>  	}
> @@ -102,7 +102,7 @@ public:
>  	}
>  
>  	template<typename T>
> -	void disconnect(T *object, void(T::*func)(Args...))
> +	void disconnect(T *object, void (T::*func)(Args...))
>  	{
>  		for (auto iter = slots_.begin(); iter != slots_.end(); ) {
>  			SlotBase<Args...> *slot = *iter;
> @@ -120,7 +120,7 @@ public:
>  		}
>  	}
>  
> -	void disconnect(void(*func)(Args...))
> +	void disconnect(void (*func)(Args...))
>  	{
>  		for (auto iter = slots_.begin(); iter != slots_.end(); ) {
>  			SlotBase<Args...> *slot = *iter;
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list