[gnome-software/gnome-3-22] trivial: Remove some dead code now the appstream-glib dep is raised
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] trivial: Remove some dead code now the appstream-glib dep is raised
- Date: Mon, 7 Nov 2016 13:37:47 +0000 (UTC)
commit f2d9f5bc0327f1e6e2206fa58709a2720aec8856
Author: Richard Hughes <richard hughsie com>
Date: Fri Sep 16 14:09:07 2016 +0100
trivial: Remove some dead code now the appstream-glib dep is raised
(cherry picked from commit fbc4fa60e87f0a72b10d3356d33bb74fbfb8d245)
src/gs-app-list.c | 18 ------------------
src/gs-app.h | 8 --------
src/gs-plugin.c | 7 -------
3 files changed, 0 insertions(+), 33 deletions(-)
---
diff --git a/src/gs-app-list.c b/src/gs-app-list.c
index 29ebe87..ba09484 100644
--- a/src/gs-app-list.c
+++ b/src/gs-app-list.c
@@ -118,20 +118,6 @@ gs_app_list_add_safe (GsAppList *list, GsApp *app)
if (!gs_app_list_check_for_duplicate (list, app))
return;
-#if !AS_CHECK_VERSION(0,6,2)
- /* check for duplicate using globs (slower) */
- for (i = 0; i < list->array->len; i++) {
- GsApp *app_tmp = g_ptr_array_index (list->array, i);
- if (as_utils_unique_id_equal (gs_app_get_unique_id (app),
- gs_app_get_unique_id (app_tmp))) {
- g_debug ("not adding duplicate %s as %s exists",
- gs_app_get_unique_id (app),
- gs_app_get_unique_id (app_tmp));
- return;
- }
- }
-#endif
-
/* just use the ref */
g_ptr_array_add (list->array, g_object_ref (app));
g_hash_table_insert (list->hash_by_id, (gpointer) id, (gpointer) app);
@@ -465,12 +451,8 @@ gs_app_list_init (GsAppList *list)
{
g_mutex_init (&list->mutex);
list->array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
-#if AS_CHECK_VERSION(0,6,2)
list->hash_by_id = g_hash_table_new ((GHashFunc) as_utils_unique_id_hash,
(GEqualFunc) as_utils_unique_id_equal);
-#else
- list->hash_by_id = g_hash_table_new (g_str_hash, g_str_equal);
-#endif
}
/**
diff --git a/src/gs-app.h b/src/gs-app.h
index 173cca1..d7bc7ef 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -97,14 +97,6 @@ typedef enum {
GS_APP_QUALITY_LAST
} GsAppQuality;
-#if !AS_CHECK_VERSION(0,6,2)
-#define AS_APP_QUIRK_NEEDS_USER_ACTION (1 << 8)
-#endif
-
-#if !AS_CHECK_VERSION(0,6,3)
-#define AS_APP_KIND_DRIVER (AS_APP_KIND_LOCALIZATION+1)
-#endif
-
GsApp *gs_app_new (const gchar *id);
GsApp *gs_app_new_from_unique_id (const gchar *unique_id);
gchar *gs_app_to_string (GsApp *app);
diff --git a/src/gs-plugin.c b/src/gs-plugin.c
index 054d8b7..37ef7bb 100644
--- a/src/gs-plugin.c
+++ b/src/gs-plugin.c
@@ -1479,17 +1479,10 @@ gs_plugin_init (GsPlugin *plugin)
priv->enabled = TRUE;
priv->scale = 1;
priv->profile = as_profile_new ();
-#if AS_CHECK_VERSION(0,6,2)
priv->cache = g_hash_table_new_full ((GHashFunc) as_utils_unique_id_hash,
(GEqualFunc) as_utils_unique_id_equal,
g_free,
(GDestroyNotify) g_object_unref);
-#else
- priv->cache = g_hash_table_new_full (g_str_hash,
- g_str_equal,
- g_free,
- (GDestroyNotify) g_object_unref);
-#endif
g_mutex_init (&priv->cache_mutex);
g_mutex_init (&priv->timer_mutex);
g_rw_lock_init (&priv->rwlock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]