Mercurial > octave
changeset 31637:34c3cd39c4b9
eliminate unused gui_pref::ignore data member
* gui-settings.h (gui_settings::value): Don't check pref.ignore. No
code in Octave sets it to true.
* gui-preferences.h (gui_pref::ignore): Delete unused data member.
(gui_pref::gui_pref): Remove ignore arg from constructor.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 04 Dec 2022 15:29:51 -0500 |
parents | b69d89906ae9 |
children | 474e184321d3 |
files | libgui/src/gui-preferences.h libgui/src/gui-settings.h |
diffstat | 2 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/gui-preferences.h Sat Dec 03 14:45:33 2022 -0500 +++ b/libgui/src/gui-preferences.h Sun Dec 04 15:29:51 2022 -0500 @@ -36,9 +36,8 @@ struct gui_pref { - gui_pref (const QString& key_arg, const QVariant& def_arg, - const bool ignore_arg = false) - : key (key_arg), def (def_arg), ignore (ignore_arg) + gui_pref (const QString& key_arg, const QVariant& def_arg) + : key (key_arg), def (def_arg) { } // No copying! @@ -51,7 +50,6 @@ const QString key; // the key name const QVariant def; // the default value - const bool ignore; // when true, ignore, i.e. always take default }; // The version for shortcuts, where the default value is stored as a
--- a/libgui/src/gui-settings.h Sat Dec 03 14:45:33 2022 -0500 +++ b/libgui/src/gui-settings.h Sun Dec 04 15:29:51 2022 -0500 @@ -68,9 +68,6 @@ QVariant value (const gui_pref& pref) const { - if (pref.ignore) - return pref.def; // ignore the current pref and always use default - return value (pref.key, pref.def); }