[vlc-devel] [PATCH 1/3] skins2: window_manager: use C++ for: loops

Tristan Matthews le.businessman at gmail.com
Mon Apr 5 14:58:26 UTC 2021


On Mon, Apr 5, 2021 at 10:55 AM Alexandre Janniaux <ajanni at videolabs.io> wrote:
>
> Hi,
>
> On Sun, Apr 04, 2021 at 05:04:47PM -0400, Tristan Matthews wrote:
> > The whole set LGTM (and this one in particular is a win for readability).
> >
> > I haven't touched C++ in many moons so I was a bit curious about the
> > const_iterator to range (i.e. for auto loop) changes,I think there's a
> > slight change in that you could do mutable operations in the bodies of
> > these loops now? I think if you're only doing const ops in those any
> > way so it's not a big deal, it was just something that jumped out.
>
> Indeed, it can now be modified if needed, I didnĀ“t think const auto
> was valuable there. Would you prefer that I keep the const though?

I don't really have a preference, I think const auto is not quite the
same as const_iterator though, since it means the copy of the pointer
is const, not the pointed to element (again it's been like 8 years).
Your version is fine with me.

Best,
-t


More information about the vlc-devel mailing list