[vlc-devel] [PATCH] opengl: vlc_list_reverse_foreach

Alexandre Janniaux ajanni at videolabs.io
Fri Sep 20 15:15:47 CEST 2019


Hi,

Actually, I found myself writing it twice inline in my code so it might
be a good addition to the vlc list helpers.

Regards,
--
Alexandre Janniaux
Videolabs

On Fri, Sep 20, 2019 at 08:04:47AM +0000, Maxime ... wrote:
> Hi,
>
> Yes I know that I can use both vlc_list_append and vlc_list_prepend to change the order of iteration.
>
> But I might miss the point of doubly linked list that can't do reverse iteration.
>
> I use a vlc_list to store a chain of filters. They apply the filtering in normal order but I have to apply some format changes in reverse order. Should I create a new list using foreach and prepend ?
>
> Anyway you can discard this path as Thomas said, I'll send a new one. With tests.
>
> ________________________________
> De : vlc-devel <vlc-devel-bounces at videolan.org> de la part de Rémi Denis-Courmont <remi at remlab.net>
> Envoyé : jeudi 19 septembre 2019 21:09
> À : vlc-devel at videolan.org <vlc-devel at videolan.org>
> Objet : Re: [vlc-devel] [PATCH] opengl: vlc_list_reverse_foreach
>
> Hi,
>
> Maybe but what is the point? If you care about the order at all, you rarely
> need *both* ascending and descending orders. You can just swap
> vlc_list_append() and vlc_list_prepend() if you need to reverse the iteration
> order.
>
> --
> Реми Дёни-Курмон
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list