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

Kevin Ottens noreply at phabricator.kde.org
Mon Dec 23 20:50:04 GMT 2019


ervin added inline comments.

INLINE COMMENTS

> tcanabrava wrote in kconfig_compiler.cpp:1122
> .contains adds way more readability than std::find_if(std::begin(temporaryStringVector), std::end(temporaryStringVector) != std::end(temporaryStringVector), so I opted for this.

You know this all sounds like personal preferences more than anything? If the code duplication I tried to highlight across those reviews was addressed in the first place and if the find_if call was wrapped in a tiny convenience you could address apol's comment and have more readability at the call site (because right now I don't find the ctor call + contains() calls chaining as overly readable to be honest. Especially since now there's some logic in several pieces of data and some still in code...

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/c44e1f02/attachment.html>


More information about the Kde-frameworks-devel mailing list