From 3970c1d1a2ef425b281e823b8ee6dc2aaebdc138 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Sat, 6 Jul 2019 13:20:08 -0700 Subject: Cleanup group comparison functions Reduce code repetition by using an array of GCompareFunc function pointers. --- includes/info.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'includes/info.h') diff --git a/includes/info.h b/includes/info.h index f2d442f4..f85ab39c 100644 --- a/includes/info.h +++ b/includes/info.h @@ -21,7 +21,7 @@ #include #include -enum { +enum InfoGroupSort { INFO_GROUP_SORT_NONE, INFO_GROUP_SORT_NAME_ASCENDING, INFO_GROUP_SORT_NAME_DESCENDING, @@ -29,6 +29,7 @@ enum { INFO_GROUP_SORT_VALUE_DESCENDING, INFO_GROUP_SORT_TAG_ASCENDING, INFO_GROUP_SORT_TAG_DESCENDING, + INFO_GROUP_SORT_MAX, }; struct Info { @@ -47,7 +48,7 @@ struct Info { struct InfoGroup { const gchar *name; - int sort; + enum InfoGroupSort sort; GArray *fields; -- cgit v1.2.3