[gnome-software: 3/18] gs-app: Drop PROP_LAST




commit 4b73d269d8749e07e9448721965638ca5f5ef9a9
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu May 27 18:36:25 2021 +0100

    gs-app: Drop PROP_LAST
    
    This avoids `-Wswitch-enum` warning about it being missing from
    `switch` statements.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 lib/gs-app.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index 25e4bdde5..e68889d20 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -151,10 +151,9 @@ typedef enum {
        PROP_KEY_COLORS,
        PROP_IS_UPDATE_DOWNLOADED,
        PROP_URL_MISSING,
-       PROP_LAST
 } GsAppProperty;
 
-static GParamSpec *obj_props[PROP_LAST] = { NULL, };
+static GParamSpec *obj_props[PROP_URL_MISSING + 1] = { NULL, };
 
 G_DEFINE_TYPE_WITH_PRIVATE (GsApp, gs_app, G_TYPE_OBJECT)
 
@@ -5020,7 +5019,7 @@ gs_app_class_init (GsAppClass *klass)
                                        NULL,
                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
 
-       g_object_class_install_properties (object_class, PROP_LAST, obj_props);
+       g_object_class_install_properties (object_class, G_N_ELEMENTS (obj_props), obj_props);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]