aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-option.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli/cli-option.h')
-rw-r--r--gdb/cli/cli-option.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/cli/cli-option.h b/gdb/cli/cli-option.h
index d231d8b..3fd0c0c 100644
--- a/gdb/cli/cli-option.h
+++ b/gdb/cli/cli-option.h
@@ -82,7 +82,7 @@ public:
returns the address of some member. */
union
{
- int *(*boolean) (const option_def &, void *ctx);
+ bool *(*boolean) (const option_def &, void *ctx);
unsigned int *(*uinteger) (const option_def &, void *ctx);
int *(*integer) (const option_def &, void *ctx);
const char **(*enumeration) (const option_def &, void *ctx);
@@ -155,7 +155,7 @@ template<typename Context>
struct boolean_option_def : option_def
{
boolean_option_def (const char *long_option_,
- int *(*get_var_address_cb_) (Context *),
+ bool *(*get_var_address_cb_) (Context *),
show_value_ftype *show_cmd_cb_,
const char *set_doc_,
const char *show_doc_ = nullptr,
@@ -165,7 +165,7 @@ struct boolean_option_def : option_def
show_cmd_cb_,
set_doc_, show_doc_, help_doc_)
{
- var_address.boolean = detail::get_var_address<int, Context>;
+ var_address.boolean = detail::get_var_address<bool, Context>;
}
};
@@ -173,11 +173,11 @@ struct boolean_option_def : option_def
hood, but unlike boolean options, flag options don't take an on/off
argument. */
-template<typename Context = int>
+template<typename Context = bool>
struct flag_option_def : boolean_option_def<Context>
{
flag_option_def (const char *long_option_,
- int *(*var_address_cb_) (Context *),
+ bool *(*var_address_cb_) (Context *),
const char *set_doc_,
const char *help_doc_ = nullptr)
: boolean_option_def<Context> (long_option_,