]> git.lyx.org Git - lyx.git/commit
Pass arguments by address in convert() templates
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 11 Sep 2024 14:43:26 +0000 (16:43 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 11 Sep 2024 14:43:26 +0000 (16:43 +0200)
commita47d66df34d27742d21efd84e662031d4c0a0a60
tree09a2b601a345032d0cc4943995b7b8cc3ef91f25
parent291d2db18ed8e7a886a349b5138367233577f537
Pass arguments by address in convert() templates

The situation of the convert<>() template was a mess: the header
announced that template specializations passed strings by address (my
doing long ago), but the code would just define versions that upass
strings by value.

The solution is to pass all values by address. This works very well,
_except_ when the value is a string litteral.

Defining the templates thus requires a bit of work.

Spotted by Coverity scan.
src/support/convert.cpp
src/support/convert.h