[Mesa-dev] [PATCH] isl: annotate isl_get_interleaved_msaa_px_size_sa return value as const

Jason Ekstrand jason at jlekstrand.net
Tue Feb 7 19:34:13 UTC 2017

On Tue, Feb 7, 2017 at 10:42 AM, Emil Velikov <emil.l.velikov at gmail.com>

> On 7 February 2017 at 16:11, Jason Ekstrand <jason at jlekstrand.net> wrote:
> > How does it make any sense to declare const on the return type of a
> function
> > that doesn't return a pointer???  It's not returning by reference, it's
> > returning a copy so const on the return type of the function means
> nothing.
> >
> Seems like you missed a similar nitpick in commit
> edf3113aeddcf66cb24906e53a2d4f41616f8985
> Dropping the const from get_px_size_sa() or adding one here will both
> make the compiler happy.
> Let me know what you prefer - I'm fine either way.

I'd rather drop both.  I didn't even know returning a const thing was valid

> Thanks
> Emil
> P.S. Can I interest you in using plain text emails ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170207/bc9d349c/attachment.html>

More information about the mesa-dev mailing list