[LyX/master] Do not return copies of string members

Jean-Marc Lasgouttes lasgouttes at lyx.org
Thu May 11 13:26:29 UTC 2023


Le 10/05/2023 à 23:19, Enrico Forestieri a écrit :
>>> After this commit my cygwin build crashes badly at startup. I can't 
>>> even get a backtrace. What is strange is that a native Windows build 
>>> works fine, instead. Both builds use the same version of gcc:

OK, I'll revert for now.

> However I get a lot of warnings like the following:
> 
> In file included from ../../../../src/frontends/qt/Toolbars.cpp:15:
> ../../../../src/Converter.h: In member function ‘const string& 
> lyx::Converter::from() const’:
> ../../../../src/Converter.h:55:51: warning: returning reference to 
> temporary [-Wreturn-local-addr]
>     55 |         std::string const & from() const { return from_; }
>        |                                                   ^~~~~

Does this warning make any sense to you? What do I miss? I get no 
warning here.

JMarc




More information about the lyx-devel mailing list