D26126: Simplify param method: Return Early, Use a Map and Assert.
Kevin Ottens
noreply at phabricator.kde.org
Mon Dec 23 16:40:08 GMT 2019
ervin added inline comments.
INLINE COMMENTS
> kconfig_compiler.cpp:1024
> +
> + auto valueMap = std::map<QString, QString> {
> + {QStringLiteral("string"), QStringLiteral("const QString &")},
std::map looks like a bad idea here, either use QHash (preferred in massively based Qt code) or std::unordered_map.
Also for both temporaries you pay the price of their allocation and deallocation at each call. Even a mutex used at each call would do better. ;-)
REPOSITORY
R237 KConfig
REVISION DETAIL
https://phabricator.kde.org/D26126
To: tcanabrava
Cc: ervin, GB_2, apol, kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191223/ce132523/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list