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 -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel