]> git.lyx.org Git - features.git/commit
Do not return copies of string members
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 5 May 2023 18:35:23 +0000 (20:35 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 5 May 2023 18:35:23 +0000 (20:35 +0200)
commit3ae5d6bdec1df23cc0d848b2d8bf6b0932eeee3b
tree0ae6c1d255a6ad028563d1c22d9a9288f94ff7c1
parent4d31e20d7d790554aab655ae11c9cd0dd4a6d6f1
Do not return copies of string members

This fixes the g++ 12 warnings below.

../../master/src/Converter.cpp:714:55: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  714 |                                         Mover const & mover = getMover(conv.to());
      |                                                       ^~~~~
../../master/src/Converter.cpp:714:71: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::to() const())’
  714 |                                         Mover const & mover = getMover(conv.to());
      |                                                               ~~~~~~~~^~~~~~~~~~~
../../master/src/Converter.cpp:786:39: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  786 |                         Mover const & mover = getMover(conv.from());
      |                                       ^~~~~
../../master/src/Converter.cpp:786:55: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::from() const())’
  786 |                         Mover const & mover = getMover(conv.from());
src/Converter.h