New Patches
Richard Kimberly Heck
rikiheck at lyx.org
Fri Nov 20 14:52:12 UTC 2020
On 11/19/20 2:03 PM, José Abílio Matos wrote:
>
> On Thursday, November 19, 2020 2:23:14 PM WET Jean-Marc Lasgouttes wrote:
>
> > I have to say that lambdas are not my cup of tea, but the original code
>
> > is not great either.
>
>
> With variable capture lambdas can sometimes be subtle, but in this
> case that is not an issue and the code is a lot more readable. :-)
>
I find it makes a big difference for me, in terms of readability, if the
lambda is separated out. E.g. instead of:
@@ -86,7 +87,8 @@ GuiCommandBuffer::GuiCommandBuffer(GuiView * view)
: view_(view)
{
transform(lyxaction.func_begin(), lyxaction.func_end(),
- back_inserter(commands_), firster());
+ back_inserter(commands_),
+ [](auto const & p) { return p.first; });
something like:
auto pfirst = [](auto const & p) { return p.first; };
transform(back_inserter(commands_), p.first);
I.e., it's parsing all the parens that is hard.
Riki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201120/c0daee95/attachment.html>
More information about the lyx-devel
mailing list