aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-out.c
diff options
context:
space:
mode:
authorMarco Barisione <mbarisione@undo.io>2021-05-19 13:58:40 +0100
committerMarco Barisione <mbarisione@undo.io>2021-05-19 13:58:40 +0100
commit4915bfdcfb271cab6ca7534916c42e98cf22f953 (patch)
treeb84c65da6b8f840d5f6c75711a9df36cc23d9496 /gdb/ui-out.c
parentd9211df246b74aa4f1ba86f04933eca86862a352 (diff)
downloadgdb-4915bfdcfb271cab6ca7534916c42e98cf22f953.zip
gdb-4915bfdcfb271cab6ca7534916c42e98cf22f953.tar.gz
gdb-4915bfdcfb271cab6ca7534916c42e98cf22f953.tar.bz2
gdb: Add an overloaded ui_out::text accepting a const std::string &
gdb/ChangeLog: * ui-out.h (class ui_out): Add ui_out::text accepting a constant reference to a std::string. Fix all callers using std::string::c_str. * ui-out.c (ui_out::text): Ditto.
Diffstat (limited to 'gdb/ui-out.c')
-rw-r--r--gdb/ui-out.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index d67dae4..56251c9 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -582,6 +582,12 @@ ui_out::text (const char *string)
}
void
+ui_out::text (const std::string &string)
+{
+ text (string.c_str ());
+}
+
+void
ui_out::call_do_message (const ui_file_style &style, const char *format,
...)
{