aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-out.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-03-04 11:40:49 -0700
committerTom Tromey <tromey@adacore.com>2022-03-10 10:11:38 -0700
commitfdda16e1fa9637f9b6ca846eebe881cd2901d75a (patch)
treeb6d0e59fcba33405c300de8df67af3c7dbc8d62b /gdb/ui-out.h
parent00e5d9e9da89cef94810d9d6fdb5bea403269d8d (diff)
downloadbinutils-fdda16e1fa9637f9b6ca846eebe881cd2901d75a.zip
binutils-fdda16e1fa9637f9b6ca846eebe881cd2901d75a.tar.gz
binutils-fdda16e1fa9637f9b6ca846eebe881cd2901d75a.tar.bz2
Simplify the ui-out progress API
I noticed that 'progress' is a method on ui-out, but it seems to me that it would be better if the only API were via the progress_meter class. This patch makes this change, changing progress to be a method on the meter itself.
Diffstat (limited to 'gdb/ui-out.h')
-rw-r--r--gdb/ui-out.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index 60dd6fc..cd36211 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -301,18 +301,18 @@ class ui_out
progress_meter (const progress_meter &) = delete;
progress_meter &operator= (const progress_meter &) = delete;
+ /* Emit some progress for this progress meter. HOWMUCH may range
+ from 0.0 to 1.0. */
+ void progress (double howmuch)
+ {
+ m_uiout->do_progress_notify (howmuch);
+ }
+
private:
struct ui_out *m_uiout;
};
- /* Emit some progress corresponding to the most recently created
- progress meter. HOWMUCH may range from 0.0 to 1.0. */
- void progress (double howmuch)
- {
- do_progress_notify (howmuch);
- }
-
protected:
virtual void do_table_begin (int nbrofcols, int nr_rows, const char *tblid)