# HG changeset patch # User John W. Eaton # Date 1670185791 18000 # Node ID 34c3cd39c4b9768b1b99f54441637e5bba3f634c # Parent b69d89906ae958689d76d6050f548ef8fa3067b6 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. diff -r b69d89906ae9 -r 34c3cd39c4b9 libgui/src/gui-preferences.h --- 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 diff -r b69d89906ae9 -r 34c3cd39c4b9 libgui/src/gui-settings.h --- 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); }