[Development] The age-old T* foo vs. T *foo
Ville Voutilainen
ville.voutilainen at gmail.com
Fri Oct 18 06:33:24 CEST 2019
On Fri, 18 Oct 2019 at 02:38, Jason H <jhihn at gmx.com> wrote:
>
> > > And it's not "just our style".
> >
> > LLVM uses the same style for stars and ampersands. Who else?
>
> That's another reason I prefer T *v; because you never see T& v, it's always T &v;
I don't know what you're talking about.
> QRect(const QPoint &topLeft, const QSize &size)
> QRect(const QPoint &topLeft, const QPoint &bottomRight)
> bool contains(const QPoint &point, bool proper = false) const
> bool contains(const QRect &rectangle, bool proper = false) const
> void getCoords(int *x1, int *y1, int *x2, int *y2) const
> void getRect(int *x, int *y, int *width, int *height) const
> int height() const
>
> is const Point& topLeft a thing?
Not in our code, but probably a more common thing than the alternative we use.
More information about the Development
mailing list