Remove subset_compare

I stumbled across subset_compare today, and after looking at the
callers I realized it could be removed and replaced with calls to
startswith.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2022-12-14 12:22:58 -07:00
parent 38665d717a
commit c573941878
4 changed files with 5 additions and 27 deletions

View File

@ -2140,17 +2140,17 @@ parse_backtrace_qualifiers (const char *arg,
if (this_arg.empty ())
return arg;
if (subset_compare (this_arg.c_str (), "no-filters"))
if (startswith ("no-filters", this_arg))
{
if (bt_cmd_opts != nullptr)
bt_cmd_opts->no_filters = true;
}
else if (subset_compare (this_arg.c_str (), "full"))
else if (startswith ("full", this_arg))
{
if (bt_cmd_opts != nullptr)
bt_cmd_opts->full = true;
}
else if (subset_compare (this_arg.c_str (), "hide"))
else if (startswith ("hide", this_arg))
{
if (bt_cmd_opts != nullptr)
bt_cmd_opts->hide = true;