D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.
Aleix Pol Gonzalez
noreply at phabricator.kde.org
Mon Dec 23 01:55:23 GMT 2019
apol added inline comments.
INLINE COMMENTS
> kconfig_compiler.cpp:1122
> + // Types that `{}` are ok as return type for default value.
> + if (QVector<QString>({
> + QLatin1String("stringlist"),
If instead of creating a QVector you used an initializer list directly, you could use std::find_if without having to initialize it entirely. Also you'd be able to use QLatin1String which would save constructing unneeded QStrings.
REPOSITORY
R237 KConfig
REVISION DETAIL
https://phabricator.kde.org/D26128
To: tcanabrava
Cc: apol, 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/97bb91af/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list