diff --git a/util/options.cc b/util/options.cc index 7a31b799d..19d8a1c8d 100644 --- a/util/options.cc +++ b/util/options.cc @@ -108,17 +108,6 @@ option_parser_t::add_main_options () g_option_context_add_main_entries (context, entries, nullptr); } -static gboolean -pre_parse (GOptionContext *context G_GNUC_UNUSED, - GOptionGroup *group G_GNUC_UNUSED, - gpointer data, - GError **error) -{ - option_group_t *option_group = (option_group_t *) data; - option_group->pre_parse (error); - return !*error; -} - static gboolean post_parse (GOptionContext *context G_GNUC_UNUSED, GOptionGroup *group G_GNUC_UNUSED, @@ -140,7 +129,7 @@ option_parser_t::add_group (GOptionEntry *entries, GOptionGroup *group = g_option_group_new (name, description, help_description, static_cast(option_group), nullptr); g_option_group_add_entries (group, entries); - g_option_group_set_parse_hooks (group, pre_parse, post_parse); + g_option_group_set_parse_hooks (group, nullptr, post_parse); g_option_context_add_group (context, group); } diff --git a/util/options.hh b/util/options.hh index eab576cf6..1062eef20 100644 --- a/util/options.hh +++ b/util/options.hh @@ -57,7 +57,6 @@ struct option_group_t { virtual ~option_group_t () {} - virtual void pre_parse (GError **error G_GNUC_UNUSED) {} virtual void post_parse (GError **error G_GNUC_UNUSED) {} };