diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/completer.c | 10 | ||||
-rw-r--r-- | gdb/completer.h | 2 | ||||
-rw-r--r-- | gdb/python/py-tui.c | 2 | ||||
-rw-r--r-- | gdb/python/python.c | 2 |
5 files changed, 17 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b023bfe4b2a..aa99da0c4d9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2020-04-20 Tom Tromey <tromey@adacore.com> + + * python/python.c (struct gdbpy_event): Mark move constructor as + noexcept. + * python/py-tui.c (class gdbpy_tui_window_maker): Mark move + constructor as noexcept. + * completer.h (struct completion_result): Mark move constructor as + noexcept. + * completer.c (completion_result::completion_result): Use + initialization style. Don't call reset_match_list. + 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com> * MAINTAINERS (Write After Approval): Add myself. diff --git a/gdb/completer.c b/gdb/completer.c index 0dd91a7195f..f9631f43cf4 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -2327,15 +2327,11 @@ completion_result::~completion_result () /* See completer.h */ -completion_result::completion_result (completion_result &&rhs) +completion_result::completion_result (completion_result &&rhs) noexcept + : match_list (rhs.match_list), + number_matches (rhs.number_matches) { - if (this == &rhs) - return; - - reset_match_list (); - match_list = rhs.match_list; rhs.match_list = NULL; - number_matches = rhs.number_matches; rhs.number_matches = 0; } diff --git a/gdb/completer.h b/gdb/completer.h index fd0d47b206b..d3afa5fe3ec 100644 --- a/gdb/completer.h +++ b/gdb/completer.h @@ -242,7 +242,7 @@ struct completion_result DISABLE_COPY_AND_ASSIGN (completion_result); /* Move a result. */ - completion_result (completion_result &&rhs); + completion_result (completion_result &&rhs) noexcept; /* Release ownership of the match list array. */ char **release_match_list (); diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c index de7c396be9f..ca88f85eb9f 100644 --- a/gdb/python/py-tui.c +++ b/gdb/python/py-tui.c @@ -233,7 +233,7 @@ public: ~gdbpy_tui_window_maker (); - gdbpy_tui_window_maker (gdbpy_tui_window_maker &&other) + gdbpy_tui_window_maker (gdbpy_tui_window_maker &&other) noexcept : m_constr (std::move (other.m_constr)) { } diff --git a/gdb/python/python.c b/gdb/python/python.c index d65cca403be..4875ffd2935 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -975,7 +975,7 @@ struct gdbpy_event { } - gdbpy_event (gdbpy_event &&other) + gdbpy_event (gdbpy_event &&other) noexcept : m_func (other.m_func) { other.m_func = nullptr; |