Re: [LyX/master] Pass parameters as const references when possible

2020-10-02 Thread Jean-Marc Lasgouttes
Le 02/10/2020 à 19:11, Richard Kimberly Heck a écrit : On 10/2/20 12:29 PM, Jean-Marc Lasgouttes wrote: /// Does an optional argument follow after the current token? - bool hasOpt(std::string const l = "["); + bool hasOpt(std::string const & l = "["); I am a bit surprised t

Re: [LyX/master] Pass parameters as const references when possible

2020-10-02 Thread Richard Kimberly Heck
On 10/2/20 12:29 PM, Jean-Marc Lasgouttes wrote: > /// Does an optional argument follow after the current token? > - bool hasOpt(std::string const l = "["); > + bool hasOpt(std::string const & l = "["); I am a bit surprised that this is allowed---it looks like a reference to a tempor