mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
Add another constructor to scoped_restore_current_language
While working on something else, I noticed that this is relatively common: scoped_restore_current_language save; set_language (something); This patch adds a second constructor to scoped_restore_current_language to simplify this idiom. Reviewed-By: Tom de Vries <tdevries@suse.de>
This commit is contained in:
@@ -3734,8 +3734,7 @@ create_std_terminate_master_breakpoint (void)
|
||||
const char *const func_name = "std::terminate()";
|
||||
|
||||
scoped_restore_current_program_space restore_pspace;
|
||||
scoped_restore_current_language save_language;
|
||||
set_language (language_cplus);
|
||||
scoped_restore_current_language save_language (language_cplus);
|
||||
|
||||
for (struct program_space *pspace : program_spaces)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user