MCPcopy Create free account
hub / github.com/KDE/kdiff3 / calcWhiteDiff3Lines

Method calcWhiteDiff3Lines

src/diff.cpp:1218–1229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216}
1217
1218void Diff3LineList::calcWhiteDiff3Lines(
1219 const std::shared_ptr<LineDataVector> &pldA, const std::shared_ptr<LineDataVector> &pldB, const std::shared_ptr<LineDataVector> &pldC, const bool bIgnoreComments)
1220{
1221 assert(empty() || (pldA != nullptr && pldB != nullptr && pldC != nullptr));
1222 // Init white line flags
1223 for(Diff3Line& diff3Line: *this)
1224 {
1225 diff3Line.bWhiteLineA = (!diff3Line.getLineA().isValid() || (*pldA)[diff3Line.getLineA()].whiteLine() || (bIgnoreComments && (*pldA)[diff3Line.getLineA()].isPureComment()));
1226 diff3Line.bWhiteLineB = (!diff3Line.getLineB().isValid() || (*pldB)[diff3Line.getLineB()].whiteLine() || (bIgnoreComments && (*pldB)[diff3Line.getLineB()].isPureComment()));
1227 diff3Line.bWhiteLineC = (!diff3Line.getLineC().isValid() || (*pldC)[diff3Line.getLineC()].whiteLine() || (bIgnoreComments && (*pldC)[diff3Line.getLineC()].isPureComment()));
1228 }
1229}
1230
1231// My own diff-invention:
1232/*

Callers 2

determineFileAlignmentFunction · 0.80
mainInitMethod · 0.80

Calls 6

getLineAMethod · 0.80
whiteLineMethod · 0.80
getLineBMethod · 0.80
getLineCMethod · 0.80
isValidMethod · 0.45
isPureCommentMethod · 0.45

Tested by 1

determineFileAlignmentFunction · 0.64