From fce08b2941c0fea8628968a4c0af246cc279cf7a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 08:24:53 +0000 Subject: [PATCH] Remove custom starts_with methods in favor of C++20 std::string::starts_with The custom starts_with() helper methods are redundant since Z3 uses C++20, which includes std::string::starts_with() as a member function. Updated all call sites to use the standard library method. Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> --- src/test/lp/argument_parser.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/test/lp/argument_parser.h b/src/test/lp/argument_parser.h index cb238136e..9c87fa91b 100644 --- a/src/test/lp/argument_parser.h +++ b/src/test/lp/argument_parser.h @@ -73,7 +73,7 @@ public: i++; m_used_options_with_after_string[ar] = m_args[i]; } else { - if (starts_with(ar, "-") || starts_with(ar, "//")) + if (ar.starts_with("-") || ar.starts_with("//")) status_is_ok = false; m_free_args.push_back(ar); @@ -99,19 +99,11 @@ public: return ""; } - bool starts_with(const std::string& s, const std::string& prefix) const { - return s.size() >= prefix.size() && s.compare(0, prefix.size(), prefix) == 0; - } - - bool starts_with(const std::string& s, const char* prefix) const { - return starts_with(s, std::string(prefix)); - } - std::string usage_string() { std::string ret = ""; std::vector unknown_options; for (const auto & t : m_free_args) { - if (starts_with(t, "-") || starts_with(t, "\\")) { + if (t.starts_with("-") || t.starts_with("\\")) { unknown_options.push_back(t); } }