Hi there,
Here is a patch to fix a message from Stephan that nobody but me saw,
because I discarded it instead of accepting it :) BTW, Attachment size
was over 500k, what would be a good limit size?
I replace a thing I do not really understand with another thing that I
do not really understand either. Can someone tell me whether the use o
lambda expression is OK? I do not know how to test it.
JMarc
>From 6882793db203479ec3e2564b79c90d3527697401 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Wed, 12 Feb 2020 20:38:50 +0100
Subject: [PATCH] Replace deprecated mem_fun_ref with lambda
This has been deprecated in C++17, will be removed in C++20. Lambdas
are almost more readable, although I am not sure why we do not use a
good old loop here.
---
src/insets/InsetCommandParams.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp
index e22db99595..67b35007f3 100644
--- a/src/insets/InsetCommandParams.cpp
+++ b/src/insets/InsetCommandParams.cpp
@@ -12,7 +12,6 @@
#include <config.h>
#include <algorithm>
-#include <functional>
#include "InsetCommandParams.h"
@@ -593,7 +592,7 @@ docstring InsetCommandParams::getFirstNonOptParam() const
{
ParamInfo::const_iterator it =
find_if(info_.begin(), info_.end(),
- not1(mem_fun_ref(&ParamInfo::ParamData::isOptional)));
+ [] (auto & data) { return !data.isOptional(); });
LASSERT(it != info_.end(), return docstring());
return (*this)[it->name()];
}
--
2.20.1
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel