[gnome-software: 24/29] gs-page: Simplify some constructors
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 24/29] gs-page: Simplify some constructors
- Date: Wed, 31 Mar 2021 16:03:46 +0000 (UTC)
commit d91650375a1b27c1f1f975db0c32ec26079481de
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu Jan 21 23:58:39 2021 +0000
gs-page: Simplify some constructors
Signed-off-by: Philip Withnall <pwithnall endlessos org>
src/gs-category-page.c | 4 +---
src/gs-details-page.c | 4 +---
src/gs-page.c | 4 +---
3 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/gs-category-page.c b/src/gs-category-page.c
index 4a07cd3bc..e3daf8b2b 100644
--- a/src/gs-category-page.c
+++ b/src/gs-category-page.c
@@ -601,7 +601,5 @@ gs_category_page_class_init (GsCategoryPageClass *klass)
GsCategoryPage *
gs_category_page_new (void)
{
- GsCategoryPage *self;
- self = g_object_new (GS_TYPE_CATEGORY_PAGE, NULL);
- return self;
+ return g_object_new (GS_TYPE_CATEGORY_PAGE, NULL);
}
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 8c883c822..74126d693 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -3120,7 +3120,5 @@ gs_details_page_init (GsDetailsPage *self)
GsDetailsPage *
gs_details_page_new (void)
{
- GsDetailsPage *self;
- self = g_object_new (GS_TYPE_DETAILS_PAGE, NULL);
- return GS_DETAILS_PAGE (self);
+ return GS_DETAILS_PAGE (g_object_new (GS_TYPE_DETAILS_PAGE, NULL));
}
diff --git a/src/gs-page.c b/src/gs-page.c
index 803ee9790..2048e228e 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -814,7 +814,5 @@ gs_page_class_init (GsPageClass *klass)
GsPage *
gs_page_new (void)
{
- GsPage *page;
- page = g_object_new (GS_TYPE_PAGE, NULL);
- return GS_PAGE (page);
+ return GS_PAGE (g_object_new (GS_TYPE_PAGE, NULL));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]