diff options
author | Yao Qi <yao.qi@linaro.org> | 2017-09-19 10:10:03 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2017-09-19 10:10:03 +0100 |
commit | d6541620447f43985b34e9a39488bafb38158221 (patch) | |
tree | 42beb6732b7a9f831e769a5bbbd98cb1010817e1 /gdb/completer.h | |
parent | 25516cc573ff3551a7ac0538e1d3de5811c7199e (diff) | |
download | gdb-d6541620447f43985b34e9a39488bafb38158221.zip gdb-d6541620447f43985b34e9a39488bafb38158221.tar.gz gdb-d6541620447f43985b34e9a39488bafb38158221.tar.bz2 |
Use DISABLE_COPY_AND_ASSIGN
We have many classes that copy cotr and assignment operator are deleted,
so this patch replaces these existing mechanical code with macro
DISABLE_COPY_AND_ASSIGN.
gdb:
2017-09-19 Yao Qi <yao.qi@linaro.org>
* annotate.h (struct annotate_arg_emitter): Use
DISABLE_COPY_AND_ASSIGN.
* common/refcounted-object.h (refcounted_object): Likewise.
* completer.h (struct completion_result): Likewise.
* dwarf2read.c (struct dwarf2_per_objfile): Likewise.
* filename-seen-cache.h (filename_seen_cache): Likewise.
* gdbcore.h (thread_section_name): Likewise.
* gdb_regex.h (compiled_regex): Likewise.
* gdbthread.h (scoped_restore_current_thread): Likewise.
* inferior.h (scoped_restore_current_inferior): Likewise.
* jit.c (jit_reader): Likewise.
* linespec.h (struct linespec_result): Likewise.
* mi/mi-parse.h (struct mi_parse): Likewise.
* nat/fork-inferior.c (execv_argv): Likewise.
* progspace.h (scoped_restore_current_program_space): Likewise.
* python/python-internal.h (class gdbpy_enter): Likewise.
* regcache.h (regcache): Likewise.
* target-descriptions.c (struct tdesc_reg): Likewise.
(struct tdesc_type): Likewise.
(struct tdesc_feature): Likewise.
* ui-out.h (ui_out_emit_type): Likewise.
Diffstat (limited to 'gdb/completer.h')
-rw-r--r-- | gdb/completer.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/completer.h b/gdb/completer.h index f68c6dc..82a994c 100644 --- a/gdb/completer.h +++ b/gdb/completer.h @@ -85,9 +85,7 @@ struct completion_result /* Destroy a result. */ ~completion_result (); - /* Disable copying, since we don't need it. */ - completion_result (const completion_result &rhs) = delete; - void operator= (const completion_result &rhs) = delete; + DISABLE_COPY_AND_ASSIGN (completion_result); /* Move a result. */ completion_result (completion_result &&rhs); @@ -146,9 +144,7 @@ public: completion_tracker (); ~completion_tracker (); - /* Disable copy. */ - completion_tracker (const completion_tracker &rhs) = delete; - void operator= (const completion_tracker &rhs) = delete; + DISABLE_COPY_AND_ASSIGN (completion_tracker); /* Add the completion NAME to the list of generated completions if it is not there already. If too many completions were already |