mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
gdb: make inferior::m_terminal an std::string
Same idea as the previous patch, but for m_terminal. Change-Id: If9367d5db8c976a4336680adca4ea5bc31ab64d2
This commit is contained in:
@ -111,18 +111,15 @@ inferior::unpush_target (struct target_ops *t)
|
||||
}
|
||||
|
||||
void
|
||||
inferior::set_tty (const char *terminal_name)
|
||||
inferior::set_tty (std::string terminal_name)
|
||||
{
|
||||
if (terminal_name != nullptr && *terminal_name != '\0')
|
||||
m_terminal = make_unique_xstrdup (terminal_name);
|
||||
else
|
||||
m_terminal = NULL;
|
||||
m_terminal = std::move (terminal_name);
|
||||
}
|
||||
|
||||
const char *
|
||||
const std::string &
|
||||
inferior::tty ()
|
||||
{
|
||||
return m_terminal.get ();
|
||||
return m_terminal;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user