[LyX/master] Fix compilation problem
Richard Kimberly Heck
rikiheck at gmail.com
Thu Jan 5 04:10:19 UTC 2023
On 1/4/23 22:09, Richard Kimberly Heck wrote:
> commit 04025d0259cb556daf54bb74a01b9f9a615dcb77
> Author: Richard Kimberly Heck <rikiheck at lyx.org>
> Date: Wed Jan 4 23:04:02 2023 -0500
>
> Fix compilation problem
> ---
> src/mathed/InsetMathDecoration.cpp | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/mathed/InsetMathDecoration.cpp b/src/mathed/InsetMathDecoration.cpp
> index 616d1f3..e0a5d85 100644
> --- a/src/mathed/InsetMathDecoration.cpp
> +++ b/src/mathed/InsetMathDecoration.cpp
> @@ -188,7 +188,7 @@ void InsetMathDecoration::infoize(odocstream & os) const
> namespace {
> struct Attributes {
> Attributes() : over(false) {}
> - Attributes(bool o, string_view entity)
> + Attributes(bool o, string const & entity)
The point of string_view is to avoid a copy here. Even with the use of
const &, a copy has to be made of the original constant string, a const
char *. Would it be OK to use instead:
+ Attributes(bool o, const char * entity)
?? I think so, but I avoid C-style strings whenever I can, out of paranoia.
Riki
More information about the lyx-devel
mailing list