[PATCH] Refactoring based on cppcheck suggestions
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Mon Oct 5 15:13:09 UTC 2020
Le 05/10/2020 à 17:06, Scott Kostyshak a écrit :
> After thinking about it more though, I agree that the new version seems
> to be better in terms of having only one return, although it's
> interesting that some minor complexity (e.g., the cast or the explicit
> comparison to nullptr) has to be added to achieve this in some cases.
The comparison to nullptr is not needed afaik. It just makes more sense.
One knows that if() requires a boolean in general, but in the case of a
return statement, having to check return type makes things a bit too
difficult IMO.
JMarc
More information about the lyx-devel
mailing list