[libcamera-devel] [PATCH] libcamera: bound_method: Fix type of pack for void methods

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Apr 12 20:56:18 CEST 2021


Hi Laurent,

On 07/04/2021 15:53, Laurent Pinchart wrote:
> The BoundMethodPack used by the void BoundMethodArgs variant incorrectly
> specified the template argument as void * instead of void. This causes
> no functional problem, but results in space for an unused void * return
> value being reserved. Fix it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

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


> ---
>  include/libcamera/bound_method.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h
> index 95a956530877..f216e3b56826 100644
> --- a/include/libcamera/bound_method.h
> +++ b/include/libcamera/bound_method.h
> @@ -174,7 +174,7 @@ template<typename T, typename... Args>
>  class BoundMethodMember<T, void, Args...> : public BoundMethodArgs<void, Args...>
>  {
>  public:
> -	using PackType = typename BoundMethodArgs<void *, Args...>::PackType;
> +	using PackType = typename BoundMethodArgs<void, Args...>::PackType;
>  
>  	BoundMethodMember(T *obj, Object *object, void (T::*func)(Args...),
>  			  ConnectionType type = ConnectionTypeAuto)
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list