use STL were no implicit sharing is required
ClosedPublic

Authored by cullmann on Dec 9 2018, 5:35 PM.

Details

Summary

try to move to STL for some parts that don't want any sharing nor
detaching

Test Plan

make && make test

Diff Detail

Repository
R39 KTextEditor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cullmann created this revision.Dec 9 2018, 5:35 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptDec 9 2018, 5:35 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
cullmann requested review of this revision.Dec 9 2018, 5:35 PM
cullmann updated this revision to Diff 47204.Dec 9 2018, 6:33 PM

more STL

dhaumann accepted this revision.Dec 10 2018, 6:38 PM
dhaumann added a subscriber: dhaumann.

Looks good, please commit. With these kind of changes, we soon support up to 2^64 lines in a document? ;)

This revision is now accepted and ready to land.Dec 10 2018, 6:38 PM
cullmann updated this revision to Diff 47376.Dec 11 2018, 6:58 PM

more in-place changes instead of copying

cullmann planned changes to this revision.Dec 11 2018, 7:02 PM

I will do some more things, therefore one can wait bit with reviewing, beside if you see some faults ;=)

cullmann updated this revision to Diff 47377.Dec 11 2018, 7:08 PM

STL doesn't need qAsConst

This revision is now accepted and ready to land.Dec 11 2018, 7:08 PM
cullmann updated this revision to Diff 47378.Dec 11 2018, 7:18 PM

no copying of cursor sets, only in-place updates

dhaumann accepted this revision.Dec 12 2018, 12:00 AM

Looks still good to me.

src/buffer/katetextblock.cpp
64

Is there a reason why this assert is useless now?

cullmann marked an inline comment as done.Dec 12 2018, 7:25 PM
cullmann added inline comments.
src/buffer/katetextblock.cpp
64

.at() will throw (or abort)

cullmann marked 2 inline comments as done.Dec 12 2018, 7:26 PM
This revision was automatically updated to reflect the committed changes.