D11291: Do not add return type to constructors declaration when editing definition in signature assistant.

Milian Wolff noreply at phabricator.kde.org
Tue Mar 13 21:54:10 UTC 2018


mwolff added inline comments.

INLINE COMMENTS

> adaptsignatureassistant.cpp:49
>  
>  bool isConstructor(const Declaration *functionDecl)
>  {

afaik you can simplify the below by reusing a function from DUChainUtils that gets you the declaration for a definition. always cast that at the start and then cast the return result

> adaptsignatureassistant.cpp:53
>      auto classFun = dynamic_cast<const ClassFunctionDeclaration*>(functionDecl);
> -    return classFun && classFun->isConstructor();
> +    if(classFun) {
> +        return classFun->isConstructor();

here and below: space after keywords (`if (...`)

REPOSITORY
  R32 KDevelop

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

To: shashwatdixit, kfunk, mwolff, #kdevelop, brauch
Cc: brauch, apol, #kdevelop, kdevelop-devel, antismap, iodelay, vbspam, njensen, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180313/27d40ef6/attachment-0001.html>


More information about the KDevelop-devel mailing list