From 6d259eef6368438da4b7d4f26e4923860756ac0b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 8 Sep 2024 01:00:58 +0000 Subject: [PATCH] sync to p-ranav/argparse@fd13c2859131ab463e617a5a8abcc69eb7e1d897 --- .gitpicker.json | 2 +- argparse.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitpicker.json b/.gitpicker.json index c1bb665..6edcbc4 100644 --- a/.gitpicker.json +++ b/.gitpicker.json @@ -54,7 +54,7 @@ { "user": "p-ranav", "repo": "argparse", - "branch": "8a7fa1899822947f7553921f7bcec12d8d0f89a7", + "branch": "fd13c2859131ab463e617a5a8abcc69eb7e1d897", "data": [ { "root": "include/argparse", diff --git a/argparse.hpp b/argparse.hpp index 25c1081..0843613 100644 --- a/argparse.hpp +++ b/argparse.hpp @@ -550,7 +550,7 @@ std::size_t get_levenshtein_distance(const StringType &s1, } else if (s1[i - 1] == s2[j - 1]) { dp[i][j] = dp[i - 1][j - 1]; } else { - dp[i][j] = 1 + std::min({dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]}); + dp[i][j] = 1 + std::min({dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]}); } } } @@ -562,7 +562,7 @@ template std::string get_most_similar_string(const std::map &map, const std::string &input) { std::string most_similar{}; - std::size_t min_distance = std::numeric_limits::max(); + std::size_t min_distance = (std::numeric_limits::max)(); for (const auto &entry : map) { std::size_t distance = get_levenshtein_distance(entry.first, input); @@ -2057,7 +2057,7 @@ class ArgumentParser { std::string curline("Usage: "); curline += this->m_program_name; const bool multiline_usage = - this->m_usage_max_line_width < std::numeric_limits::max(); + this->m_usage_max_line_width < (std::numeric_limits::max)(); const size_t indent_size = curline.size(); const auto deal_with_options_of_group = [&](std::size_t group_idx) { @@ -2534,7 +2534,7 @@ class ArgumentParser { std::map m_subparser_used; std::vector m_mutually_exclusive_groups; bool m_suppress = false; - std::size_t m_usage_max_line_width = std::numeric_limits::max(); + std::size_t m_usage_max_line_width = (std::numeric_limits::max)(); bool m_usage_break_on_mutex = false; int m_usage_newline_counter = 0; std::vector m_group_names;