forked from Imagelibrary/binutils-gdb
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:
@@ -860,6 +860,10 @@ class scoped_restore_current_language
|
||||
public:
|
||||
|
||||
scoped_restore_current_language ();
|
||||
|
||||
/* Set the current language as well. */
|
||||
explicit scoped_restore_current_language (enum language lang);
|
||||
|
||||
~scoped_restore_current_language ();
|
||||
|
||||
scoped_restore_current_language (scoped_restore_current_language &&other)
|
||||
|
||||
Reference in New Issue
Block a user