D26130: Simplify return logic
Tomaz Canabrava
noreply at phabricator.kde.org
Mon Dec 23 18:17:58 GMT 2019
tcanabrava added a comment.
In D26130#582343 <https://phabricator.kde.org/D26130#582343>, @ervin wrote:
> This is pointless, most compilers would do NRVO (+ move assign) here... which would be neatly obliterated by the ternary operator. This is a pessimisation you're proposing here, not an optimization.
I don't know what you are talking about, this is using return time optimization. have you tested the code or just assumed that ternaries will not do NRVO?
REPOSITORY
R237 KConfig
REVISION DETAIL
https://phabricator.kde.org/D26130
To: tcanabrava, patrickelectric, ervin
Cc: ervin, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191223/93faea7d/attachment.html>
More information about the Kde-frameworks-devel
mailing list