D7979: Filter out warnings as error from parser's compile flags

Milian Wolff noreply at phabricator.kde.org
Wed Sep 27 07:28:53 UTC 2017


mwolff added inline comments.

INLINE COMMENTS

> mwolff wrote in parsesession.cpp:72
> hmmm I like the brevity of this code, I'm not too sure what others think. mutating from within a remove_if callback? Haven't seen this before, but it should work so let's keep it this way. please do add a comment here though.

discussing this with a colleague, he also agrees that this is quite uncommon. Could you please separate the code using two algorithms for readability? Sure, it will be marginally slower than, but easier to grasp for readers and also more failsafe. i.e. split it up like so:

  // step one: remove -Werror
  erase + remove_if
  // step two: replace -Werror= with -W
  transform or for_each

Actually, thinking out loud - could you simply always only do a transform/foreach and replace the `-Werror` args with empty strings?

REPOSITORY
  R32 KDevelop

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

To: gracicot, #kdevelop, kfunk, mwolff, brauch
Cc: mwolff, brauch, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170927/d901a808/attachment.html>


More information about the KDevelop-devel mailing list