D25039: Fix Clazy performance issues, const &

Anthony Fieroni noreply at phabricator.kde.org
Thu Oct 31 06:54:54 GMT 2019


anthonyfieroni added a comment.


  Not using references is not a big problem with QString nor QUrl since they are reference counting objects, say if you don't change their content they are immutable, so
  
    const QString s = other; // it's fine
    void func(QString s)
    {
         const QString o = s; // use o instead of s is also fine, using plain s is fine too, if you don't touch mutability 
         ...
    }

REPOSITORY
  R241 KIO

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

To: meven, #frameworks, dfaure
Cc: anthonyfieroni, kossebau, 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/20191031/841fbce5/attachment.html>


More information about the Kde-frameworks-devel mailing list