mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-04 14:23:51 +00:00
fix warnings
This commit is contained in:
parent
414bff9d92
commit
d376292ff5
@ -39,7 +39,7 @@ std::size_t levenshteinDistance(const std::string &s1, const std::string &s2) {
|
|||||||
// - Inserting a character into `s1` (curr[jj - 1] + 1)
|
// - Inserting a character into `s1` (curr[jj - 1] + 1)
|
||||||
// - Substituting a character (prev[jj - 1] + cost)
|
// - Substituting a character (prev[jj - 1] + cost)
|
||||||
|
|
||||||
curr[jj] = std::min({prev[jj] + 1, curr[jj - 1] + 1, prev[jj - 1] + cost});
|
curr[jj] = (std::min)({prev[jj] + 1, curr[jj - 1] + 1, prev[jj - 1] + cost});
|
||||||
}
|
}
|
||||||
prev = std::exchange(curr, prev); // Swap vectors efficiently
|
prev = std::exchange(curr, prev); // Swap vectors efficiently
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ void addSubcommandCloseMatchDetection(CLI::App *app, std::size_t minDistance = 3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// add a callback that runs before a final callback and loops over the remaining arguments for subcommands
|
// add a callback that runs before a final callback and loops over the remaining arguments for subcommands
|
||||||
app->parse_complete_callback([&app, minDistance, list = std::move(list)]() {
|
app->parse_complete_callback([app, minDistance,list=std::move(list)]() {
|
||||||
auto extras = app->remaining();
|
auto extras = app->remaining();
|
||||||
if(extras.empty()) {
|
if(extras.empty()) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user