[util] Remove unused pre_parse callback logic

This commit is contained in:
Behdad Esfahbod 2021-08-05 11:22:20 -06:00
parent 09e4d7dd30
commit fe90fbeba3
2 changed files with 1 additions and 13 deletions

View File

@ -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<gpointer>(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);
}

View File

@ -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) {}
};