diff options
author | Maxim Pimenov <m@maps.me> | 2015-11-25 15:56:26 +0300 |
---|---|---|
committer | Maxim Pimenov <m@maps.me> | 2015-11-25 15:56:26 +0300 |
commit | 3e74bcbfedaea6966a941056fa777f438ef82ffe (patch) | |
tree | f009dd852835106d194c60959e66495e0f6cfaf7 /base/string_utils.hpp | |
parent | 503e5ad69472005b4911726d2b6912b1c00cc2cb (diff) |
Review fixes.
Diffstat (limited to 'base/string_utils.hpp')
-rw-r--r-- | base/string_utils.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/base/string_utils.hpp b/base/string_utils.hpp index 9c50a9084d..850a7c8f61 100644 --- a/base/string_utils.hpp +++ b/base/string_utils.hpp @@ -336,8 +336,7 @@ uint32_t EditDistance(TIter const & b1, TIter const & e1, TIter const & b2, TIte { auto const & c2 = *it2; - best[i][j] = min(best[i][j], best[i - 1][j] + 1); - best[i][j] = min(best[i][j], best[i][j - 1] + 1); + best[i][j] = min(best[i - 1][j], best[i][j - 1]) + 1; best[i][j] = min(best[i][j], best[i - 1][j - 1] + (c1 == c2 ? 0 : 1)); } } |