[libcamera-devel] [PATCH 06/11] libcamera: geometry: Add comparison operators to geometry classes

Jacopo Mondi jacopo at jmondi.org
Wed Apr 17 09:31:09 CEST 2019


Hi,

On Tue, Apr 16, 2019 at 11:08:16PM +0200, Niklas Söderlund wrote:
> Hello,
>
> On 2019-04-16 23:08:38 +0300, Laurent Pinchart wrote:
> > Hi Jacopo,
> >
> > On Tue, Apr 16, 2019 at 05:09:50PM +0200, Jacopo Mondi wrote:
> > > Hi Laurent,
> > >    very nice, thanks
> >
> > Thank you :-)
> >
> > > On Mon, Apr 15, 2019 at 07:56:55PM +0300, Laurent Pinchart wrote:
> > > > Add equality and inequality comparison operators for the Rectangle, Size
> > > > and SizeRange classes.
> > > >
> > > > For the Size class, also add ordering operators. Sizes are first
> > > > compared on combined width and height, then on area, and finally on
> > > > width only to achieve a stable ordering.
> > > >
> > > > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > >
> > > The only comment I have is that we usually put a blank line in
> > > documentation between a \brief and a \return statement.
> >
> > Actually we don't in many cases. Both variants are used. I think it
> > would make sense to standardize on one of them, and I can send a patch
> > on top of this series. The question is, what should we standardize on ?
> > :-) I propose
> >
> > /**
> >  * \fn
> >  * \brief
> >  * \param[in,out]
> >  *
> >  * Text
> >  *
> >  * \return
> >  */
> >
> > \fn is required if the function is defined in the .cpp file and not
> > allowed otherwise. \brief is required. \param is required if the
> > function takes parameters, and the [in] and [out] specifiers are
> > required. The text is optional, and if present shall be surrounded by
> > empty lines. \return is required if the function returns a value and not
> > allowed otherwise.
> >
> > This would mean no new line between \brief (or \param when present) and
> > \return if a long text is present.
> >
>
> I would support this format.
>

I can't tell why, but I like the empty line before the \return.
Anyway, this is really not an issue worth discussing about, I welcome
any of the two if they are consistent though the code base.

Thanks
  j

> --
> Regards,
> Niklas Söderlund
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20190417/03ba9626/attachment.sig>


More information about the libcamera-devel mailing list