aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-file.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ui-file.h')
-rw-r--r--gdb/ui-file.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ui-file.h b/gdb/ui-file.h
index 3df9f93..d8bc3fb 100644
--- a/gdb/ui-file.h
+++ b/gdb/ui-file.h
@@ -191,6 +191,14 @@ public:
return ret;
}
+ /* Set the internal buffer contents to STR. Any existing contents are
+ discarded. */
+ string_file &operator= (std::string &&str)
+ {
+ m_string = std::move (str);
+ return *this;
+ }
+
/* Provide a few convenience methods with the same API as the
underlying std::string. */
const char *data () const { return m_string.data (); }