]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add another constructor to scoped_restore_current_language
authorTom Tromey <tromey@adacore.com>
Wed, 14 Aug 2024 17:22:58 +0000 (11:22 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 15 Aug 2024 16:14:37 +0000 (10:14 -0600)
commitd47600c85d26176cc7030da78f8cfc6e98bcfbbf
tree13954325667b4bd371453bed04c99decb1185d93
parent5c8f918639f1df77599c50fddfdfe23a2e3cbf35
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>
gdb/breakpoint.c
gdb/language.c
gdb/language.h
gdb/mi/mi-main.c
gdb/parse.c
gdb/symmisc.c