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

Function PrintVirtualLineToRealLineMap

Src/MergeDocDiffSync.cpp:51–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50template <int npanes>
51static void
52PrintVirtualLineToRealLineMap(
53 const String& name,
54 const std::vector<std::array<int, npanes>>& vlines)
55{
56 OutputDebugString((_T("[") + name + _T("]\n")).c_str());
57 for (size_t i = 0; i < vlines.size(); ++i)
58 {
59 String str = strutils::format(_T("vline%d: "), static_cast<int>(i));
60 std::vector<String> ary;
61 ary.reserve(npanes);
62 for (int j = 0; j < npanes; ++j)
63 ary.push_back(vlines[i][j] == DiffMap::GHOST_MAP_ENTRY ? _T("-----") : strutils::format(_T("%5d"), vlines[i][j]));
64 str += strutils::join(ary.begin(), ary.end(), _T(",")) + _T("\n");
65 OutputDebugString(str.c_str());
66 }
67}
68
69#ifdef _DEBUG
70static void

Calls 6

formatFunction · 0.50
joinFunction · 0.50
sizeMethod · 0.45
reserveMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected