[gnome-software/wip/jrocha/fix-updates-list: 3/3] trivial: Refactor gs_app_is_installed to access the state directly
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/jrocha/fix-updates-list: 3/3] trivial: Refactor gs_app_is_installed to access the state directly
- Date: Wed, 19 Oct 2016 09:39:42 +0000 (UTC)
commit 549c7c91aeedda7f7c52263e2f38992b9a9aaea5
Author: Joaquim Rocha <jrocha endlessm com>
Date: Wed Oct 19 11:34:49 2016 +0200
trivial: Refactor gs_app_is_installed to access the state directly
src/gs-app.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 167c7bd..37996d2 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -2792,12 +2792,10 @@ gs_app_is_installed (GsApp *app)
g_return_val_if_fail (GS_IS_APP (app), FALSE);
- state = gs_app_get_state (app);
-
- return (state == AS_APP_STATE_INSTALLED) ||
- (state == AS_APP_STATE_UPDATABLE) ||
- (state == AS_APP_STATE_UPDATABLE_LIVE) ||
- (state == AS_APP_STATE_REMOVING);
+ return (app->state == AS_APP_STATE_INSTALLED) ||
+ (app->state == AS_APP_STATE_UPDATABLE) ||
+ (app->state == AS_APP_STATE_UPDATABLE_LIVE) ||
+ (app->state == AS_APP_STATE_REMOVING);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]