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

Sebastian Fricke sebastian.fricke at posteo.net
Wed Apr 7 19:06:44 CEST 2021


Hey Laurent,

Thank you for the patch.

On 07.04.2021 17: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.

Looks good to me.

>
>Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke at posteo.net>

>---
> 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,
>
>Laurent Pinchart

Greetings,
Sebastian
>
>_______________________________________________
>libcamera-devel mailing list
>libcamera-devel at lists.libcamera.org
>https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list