MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / diff_charsToLines

Method diff_charsToLines

3rdparty/diff-match-patch/diff_match_patch.cpp:554–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552
553
554void diff_match_patch::diff_charsToLines(QList<Diff> &diffs,
555 const QStringList &lineArray) {
556 // Qt has no mutable foreach construct.
557 QMutableListIterator<Diff> i(diffs);
558 while (i.hasNext()) {
559 Diff &diff = i.next();
560 QString text;
561 for (int y = 0; y < diff.text.length(); y++) {
562 text += lineArray.value(static_cast<ushort>(diff.text[y].unicode()));
563 }
564 diff.text = text;
565 }
566}
567
568
569int diff_match_patch::diff_commonPrefix(const QString &text1,

Callers 1

diffTextMethod · 0.80

Calls 3

nextMethod · 0.45
lengthMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected