[gnome-photos/wip/rishi/issue-77-20181002: 6/7] local-item: Use g_auto*
- From: Umang Jain <uajain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/issue-77-20181002: 6/7] local-item: Use g_auto*
- Date: Thu, 4 Oct 2018 12:21:14 +0000 (UTC)
commit 1a7e29ea278795a1a4ce9b30ab232d116c5e28c4
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Oct 2 10:56:18 2018 +0200
local-item: Use g_auto*
GExiv2 supports autocleanups since 0.10.8.
https://gitlab.gnome.org/GNOME/gnome-photos/issues/77
https://bugzilla.gnome.org/show_bug.cgi?id=790925
src/photos-local-item.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/photos-local-item.c b/src/photos-local-item.c
index 49a40947..d0b8b13e 100644
--- a/src/photos-local-item.c
+++ b/src/photos-local-item.c
@@ -291,7 +291,7 @@ photos_local_item_metadata_add_shared (PhotosBaseItem *item,
};
g_autoptr (GVariantType) array_type = NULL;
g_autoptr (GVariantType) tuple_type = NULL;
- GExiv2Metadata *metadata = NULL; /* TODO: Use g_autoptr */
+ g_autoptr (GExiv2Metadata) metadata = NULL;
gboolean ret_val = FALSE;
const gchar *mime_type;
const gchar *shared_tag = "Xmp.gnome.photos-shared";
@@ -376,7 +376,6 @@ photos_local_item_metadata_add_shared (PhotosBaseItem *item,
ret_val = TRUE;
out:
- g_clear_object (&metadata);
return ret_val;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]