mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-01 13:13:53 +00:00
style: pre-commit.ci fixes
This commit is contained in:
parent
4373489273
commit
91ded76992
@ -26,10 +26,10 @@ int levenshteinDistance(const std::string &s1, const std::string &s2) {
|
|||||||
for(size_t j = 1; j <= len2; ++j) {
|
for(size_t j = 1; j <= len2; ++j) {
|
||||||
int cost = (s1[i - 1] == s2[j - 1]) ? 0 : 1;
|
int cost = (s1[i - 1] == s2[j - 1]) ? 0 : 1;
|
||||||
dp[i][j] = (std::min)({
|
dp[i][j] = (std::min)({
|
||||||
dp[i - 1][j] + 1, // deletion
|
dp[i - 1][j] + 1, // deletion
|
||||||
dp[i][j - 1] + 1, // insertion
|
dp[i][j - 1] + 1, // insertion
|
||||||
dp[i - 1][j - 1] + cost // substitution
|
dp[i - 1][j - 1] + cost // substitution
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user