D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.

Tomaz Canabrava noreply at phabricator.kde.org
Mon Dec 23 18:46:28 GMT 2019


tcanabrava added inline comments.

INLINE COMMENTS

> apol wrote in kconfig_compiler.cpp:1122
> 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.

.contains adds way more readability than std::find_if(std::begin(temporaryStringVector), std::end(temporaryStringVector) != std::end(temporaryStringVector), so I opted for this.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D26128

To: tcanabrava, ervin
Cc: ervin, 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/c040fa5b/attachment.html>


More information about the Kde-frameworks-devel mailing list