[gnome-software] trivial: Tiny optimisation when loading appstream data



commit 30ff1fd626a7c8fd9569cb9bded86e226e4459e7
Author: Richard Hughes <richard hughsie com>
Date:   Wed Feb 17 16:26:30 2016 +0000

    trivial: Tiny optimisation when loading appstream data

 src/plugins/gs-plugin-appstream.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 8548a60..831025c 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -567,17 +567,13 @@ gs_plugin_refine_item (GsPlugin *plugin, GsApp *app, AsApp *item, GError **error
        /* set name */
        tmp = as_app_get_name (item, NULL);
        if (tmp != NULL) {
-               gs_app_set_name (app,
-                                GS_APP_QUALITY_HIGHEST,
-                                as_app_get_name (item, NULL));
+               gs_app_set_name (app, GS_APP_QUALITY_HIGHEST, tmp);
        }
 
        /* set summary */
        tmp = as_app_get_comment (item, NULL);
        if (tmp != NULL) {
-               gs_app_set_summary (app,
-                                   GS_APP_QUALITY_HIGHEST,
-                                   as_app_get_comment (item, NULL));
+               gs_app_set_summary (app, GS_APP_QUALITY_HIGHEST, tmp);
        }
 
        /* add urls */
@@ -622,9 +618,7 @@ gs_plugin_refine_item (GsPlugin *plugin, GsApp *app, AsApp *item, GError **error
                        g_prefix_error (error, "trying to parse '%s': ", tmp);
                        return FALSE;
                }
-               gs_app_set_description (app,
-                                       GS_APP_QUALITY_HIGHEST,
-                                       from_xml);
+               gs_app_set_description (app, GS_APP_QUALITY_HIGHEST, from_xml);
        }
 
        /* set icon */


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