diff options
Diffstat (limited to 'gdb/cli/cli-option.c')
-rw-r--r-- | gdb/cli/cli-option.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/cli/cli-option.c b/gdb/cli/cli-option.c index 9b303b1..d2d489b 100644 --- a/gdb/cli/cli-option.c +++ b/gdb/cli/cli-option.c @@ -58,11 +58,11 @@ struct option_def_and_value void *ctx; /* The option's value, if any. */ - gdb::optional<option_value> value; + std::optional<option_value> value; /* Constructor. */ option_def_and_value (const option_def &option_, void *ctx_, - gdb::optional<option_value> &&value_ = {}) + std::optional<option_value> &&value_ = {}) : option (option_), ctx (ctx_), value (std::move (value_)) @@ -99,7 +99,7 @@ private: allocated on the heap, so we must clear the pointer in the source, to avoid a double free. */ static void clear_value (const option_def &option, - gdb::optional<option_value> &value) + std::optional<option_value> &value) { if (value.has_value ()) { @@ -109,7 +109,7 @@ private: } }; -static void save_option_value_in_ctx (gdb::optional<option_def_and_value> &ov); +static void save_option_value_in_ctx (std::optional<option_def_and_value> &ov); /* Info passed around when handling completion. */ struct parse_option_completion_info @@ -177,7 +177,7 @@ complete_on_all_options (completion_tracker &tracker, /* Parse ARGS, guided by OPTIONS_GROUP. HAVE_DELIMITER is true if the whole ARGS line included the "--" options-terminator delimiter. */ -static gdb::optional<option_def_and_value> +static std::optional<option_def_and_value> parse_option (gdb::array_view<const option_def_group> options_group, process_options_mode mode, bool have_delimiter, @@ -496,7 +496,7 @@ complete_options (completion_tracker &tracker, } else if (**args == '-') { - gdb::optional<option_def_and_value> ov + std::optional<option_def_and_value> ov = parse_option (options_group, mode, have_delimiter, args, &completion_info); if (!ov && !tracker.have_completions ()) @@ -589,7 +589,7 @@ complete_options (completion_tracker &tracker, /* Save the parsed value in the option's context. */ static void -save_option_value_in_ctx (gdb::optional<option_def_and_value> &ov) +save_option_value_in_ctx (std::optional<option_def_and_value> &ov) { switch (ov->option.type) { |