[Differential] [Commented On] D4359: Add ClangClassHelper, to restore features of CppClassHelper
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Thu Feb 2 18:49:15 UTC 2017
kossebau added inline comments.
INLINE COMMENTS
> mwolff wrote in clangclasshelper.cpp:137
> namespace {
> template<typename Map>
> void addVariables(QVariantMap* variables, QLatin1String suffix, const Map& map)
> {
> for (auto it = map.begin(), end = map.end(); it != end; ++it) {
> variables->insert(it.key() + suffix, it.value();
> }
> }
> }
>
> that's easy to grasp and should work, no?
Well, it means when reading the code one has to jump from the place where it is called to the place where the template is called.
I see the value of DRY, just that I now and then trade repeating for ease of reading flow :)
Picked up your proposal, works fine. Not sure about that naming of the template method, as it overloads a member method, but the namespace prefix `::` should make it obvious also to the human reader what is called, no?
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D4359
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: kossebau, #kdevelop, mwolff
Cc: mwolff, arrowdodger, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170202/b09e4603/attachment.html>
More information about the KDevelop-devel
mailing list