Message ID | 20210811080546.2266825-1-kieran.bingham@ideasonboard.com |
---|---|
State | Accepted |
Commit | b1d818beb44d8a658eeae6f83a440c33aeff1f4f |
Headers | show |
Series |
|
Related | show |
Hi Kieran, Thank you for the patch. On Wed, Aug 11, 2021 at 09:05:46AM +0100, Kieran Bingham wrote: > The LIBCAMERA_O_PTR() define adds the ';' at the end of the > templated call to _o(). > > While this works for the only current user in camera_manager.cpp, even > the statement there adds another semi-colon following it. > > The addition of the semi-colon in the define unnecessarily prohibits the > macro from being used in places other than the end of a statement. > > Remove it. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > include/libcamera/base/class.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/libcamera/base/class.h b/include/libcamera/base/class.h > index a5946836d2b9..02bbd91f93f8 100644 > --- a/include/libcamera/base/class.h > +++ b/include/libcamera/base/class.h > @@ -50,7 +50,7 @@ public: \ > using Public = klass; > > #define LIBCAMERA_O_PTR() \ > - _o<Public>(); > + _o<Public>() > > #else > #define LIBCAMERA_DECLARE_PRIVATE()
diff --git a/include/libcamera/base/class.h b/include/libcamera/base/class.h index a5946836d2b9..02bbd91f93f8 100644 --- a/include/libcamera/base/class.h +++ b/include/libcamera/base/class.h @@ -50,7 +50,7 @@ public: \ using Public = klass; #define LIBCAMERA_O_PTR() \ - _o<Public>(); + _o<Public>() #else #define LIBCAMERA_DECLARE_PRIVATE()
The LIBCAMERA_O_PTR() define adds the ';' at the end of the templated call to _o(). While this works for the only current user in camera_manager.cpp, even the statement there adds another semi-colon following it. The addition of the semi-colon in the define unnecessarily prohibits the macro from being used in places other than the end of a statement. Remove it. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- include/libcamera/base/class.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)