Skip to content

Commit

Permalink
set str len in editops
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann committed Sep 18, 2022
1 parent 7a146e3 commit 75e1075
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extras/rapidfuzz_amalgamated.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
// SPDX-License-Identifier: MIT
// RapidFuzz v1.0.2
// Generated: 2022-09-18 01:54:27.952952
// Generated: 2022-09-18 16:12:25.343097
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
Expand Down Expand Up @@ -2357,6 +2357,8 @@ Editops hamming_editops(Range<InputIt1> s1, Range<InputIt2> s2, int64_t)
for (ptrdiff_t i = 0; i < s1.size(); ++i)
if (s1[i] != s2[i]) ops.emplace_back(EditType::Replace, i, i);

ops.set_src_len(static_cast<size_t>(s1.size()));
ops.set_dest_len(static_cast<size_t>(s2.size()));
return ops;
}

Expand Down
2 changes: 2 additions & 0 deletions rapidfuzz/distance/Hamming_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Editops hamming_editops(Range<InputIt1> s1, Range<InputIt2> s2, int64_t)
for (ptrdiff_t i = 0; i < s1.size(); ++i)
if (s1[i] != s2[i]) ops.emplace_back(EditType::Replace, i, i);

ops.set_src_len(static_cast<size_t>(s1.size()));
ops.set_dest_len(static_cast<size_t>(s2.size()));
return ops;
}

Expand Down

0 comments on commit 75e1075

Please sign in to comment.