[gnome-software] Remove the unused gs_app_get_kudos_weight()
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Remove the unused gs_app_get_kudos_weight()
- Date: Thu, 28 Jan 2016 15:03:30 +0000 (UTC)
commit 3b0b8ff2561858a18910f3e11d086908c0ab6d63
Author: Richard Hughes <richard hughsie com>
Date: Thu Jan 28 12:13:31 2016 +0000
Remove the unused gs_app_get_kudos_weight()
src/gs-app.c | 16 ----------------
src/gs-app.h | 1 -
src/gs-shell-search.c | 4 +---
3 files changed, 1 insertions(+), 20 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 3eb20df..21839c3 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -1895,22 +1895,6 @@ gs_app_get_kudos (GsApp *app)
}
/**
- * gs_app_get_kudos_weight:
- */
-guint
-gs_app_get_kudos_weight (GsApp *app)
-{
- guint32 tmp;
-
- g_return_val_if_fail (GS_IS_APP (app), 0);
-
- tmp = app->kudos;
- tmp = tmp - ((tmp >> 1) & 0x55555555);
- tmp = (tmp & 0x33333333) + ((tmp >> 2) & 0x33333333);
- return (((tmp + (tmp >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;
-}
-
-/**
* gs_app_get_kudos_percentage:
*/
guint
diff --git a/src/gs-app.h b/src/gs-app.h
index e9b63b6..4be59d8 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -224,7 +224,6 @@ void gs_app_set_keywords (GsApp *app,
void gs_app_add_kudo (GsApp *app,
GsAppKudo kudo);
guint64 gs_app_get_kudos (GsApp *app);
-guint gs_app_get_kudos_weight (GsApp *app);
guint gs_app_get_kudos_percentage (GsApp *app);
gboolean gs_app_get_to_be_installed (GsApp *app);
void gs_app_set_to_be_installed (GsApp *app,
diff --git a/src/gs-shell-search.c b/src/gs-shell-search.c
index 95f8496..7a29b98 100644
--- a/src/gs-shell-search.c
+++ b/src/gs-shell-search.c
@@ -246,7 +246,6 @@ gs_shell_search_get_app_sort_key (GsApp *app)
GPtrArray *ss;
GString *key;
const gchar *desc;
- gint rating;
/* sort installed, removing, other */
key = g_string_sized_new (64);
@@ -269,8 +268,7 @@ gs_shell_search_get_app_sort_key (GsApp *app)
g_string_append_printf (key, "%s:", gs_app_get_search_sort_key (app));
/* sort by kudos */
- rating = gs_app_get_kudos_weight (app);
- g_string_append_printf (key, "%03i:", rating > 0 ? rating : 0);
+ g_string_append_printf (key, "%03i:", gs_app_get_kudos_percentage (app));
/* sort by length of description */
g_string_append_printf (key, "%03" G_GSIZE_FORMAT ":",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]