D23625: Use QString::count(QChar) over QString::split().length() - 1
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Mon Sep 2 12:42:46 BST 2019
kossebau added inline comments.
> kossebau wrote in normalvimode.cpp:3844
> Guess the complete change missed to enter the commit, and review did not catch it,
> Well spotted, I shall do a follow-up.
Ah, no, textLines.last().length() needs the string section, so just a plain count would not be enough, only if combining with a QString::section call later, I now remember.
And some other patch simply turned this into splitRef, so just one alloc here currently.
So rather something where I messed up during patch juggling.
Perhaps still can be µ-optimized with using lastindexof instead :)
To: kossebau, #kate, cullmann
Cc: apol, cullmann, kwrite-devel, kde-frameworks-devel, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel