MCPcopy Create free account
hub / github.com/WinMerge/winmerge / ValidateVirtualLineToRealLineMap

Function ValidateVirtualLineToRealLineMap

Src/MergeDocDiffSync.cpp:29–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28template <int npanes>
29static void
30ValidateVirtualLineToRealLineMap(
31 const std::vector<std::array<int, npanes>>& vlines,
32 const std::array<int, npanes>& nlines)
33{
34 int line[npanes]{};
35 for (const auto& v : vlines)
36 {
37 for (int pane = 0; pane < npanes; ++pane)
38 {
39 if (v[pane] != DiffMap::GHOST_MAP_ENTRY)
40 {
41 assert(line[pane] == v[pane]);
42 ++line[pane];
43 }
44 }
45 }
46 for (int pane = 0; pane < npanes; ++pane)
47 assert(line[pane] == nlines[pane]);
48}
49
50template <int npanes>
51static void

Calls 1

assertClass · 0.85

Tested by

no test coverage detected