diff options
| author | stanly <[email protected]> | 2022-02-10 16:46:49 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:49 +0300 |
| commit | cde218e65dfef5ce03a48d641fd8f7913cf17b2d (patch) | |
| tree | d3349caea4095825a55b5ba24fe758067b29ce6f /library/cpp/diff/diff.h | |
| parent | 9f813499b4ef585cb3c2bb93de93ef003daf4fc4 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/diff/diff.h')
| -rw-r--r-- | library/cpp/diff/diff.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/diff/diff.h b/library/cpp/diff/diff.h index 94fb00cd0b3..aded9022ad0 100644 --- a/library/cpp/diff/diff.h +++ b/library/cpp/diff/diff.h @@ -27,7 +27,7 @@ namespace NDiff { }; template <typename T> - size_t InlineDiff(TVector<TChunk<T>>& chunks, const TConstArrayRef<T>& left, const TConstArrayRef<T>& right) { + size_t InlineDiff(TVector<TChunk<T>>& chunks, const TConstArrayRef<T>& left, const TConstArrayRef<T>& right) { TConstArrayRef<T> s1(left); TConstArrayRef<T> s2(right); @@ -53,8 +53,8 @@ namespace NDiff { const T* e1 = s1.begin(); const T* e2 = s2.begin(); - size_t dist = s1.size() - lcs.size(); - + size_t dist = s1.size() - lcs.size(); + const size_t n = ctx.ResultBuffer.size(); for (size_t i = 0; i <= n && (e1 != s1.end() || e2 != s2.end());) { if (i < n) { @@ -86,8 +86,8 @@ namespace NDiff { d1 = e1; d2 = e2; } - - return dist; + + return dist; } template <typename TFormatter, typename T> @@ -106,7 +106,7 @@ namespace NDiff { // Without delimiters calculates character-wise diff // With delimiters calculates token-wise diff - size_t InlineDiff(TVector<TChunk<char>>& chunks, const TStringBuf& left, const TStringBuf& right, const TString& delims = TString()); + size_t InlineDiff(TVector<TChunk<char>>& chunks, const TStringBuf& left, const TStringBuf& right, const TString& delims = TString()); size_t InlineDiff(TVector<TChunk<wchar16>>& chunks, const TWtringBuf& left, const TWtringBuf& right, const TUtf16String& delims = TUtf16String()); } |
