[PATCH] Refactoring based on cppcheck suggestions
Scott Kostyshak
skostysh at lyx.org
Mon Oct 5 15:20:49 UTC 2020
On Mon, Oct 05, 2020 at 05:13:09PM +0200, Jean-Marc Lasgouttes wrote:
> 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.
I see, makes sense.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201005/7008da64/attachment.asc>
More information about the lyx-devel
mailing list