[aravis] gc_enum_entry: arv_gc_enum_entry_get_string is not really needed.



commit 6a0bb790790d336b64318ea98c41af695005e271
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Mon Jul 9 10:51:44 2012 +0200

    gc_enum_entry: arv_gc_enum_entry_get_string is not really needed.

 src/arvgcenumentry.c   |   22 ----------------------
 src/arvgcenumentry.h   |    1 -
 src/arvgcenumeration.c |   16 ++--------------
 3 files changed, 2 insertions(+), 37 deletions(-)
---
diff --git a/src/arvgcenumentry.c b/src/arvgcenumentry.c
index c1077a8..b75a834 100644
--- a/src/arvgcenumentry.c
+++ b/src/arvgcenumentry.c
@@ -91,28 +91,6 @@ arv_gc_enum_entry_get_value (ArvGcEnumEntry *entry, GError **error)
 	return value;
 }
 
-const char *
-arv_gc_enum_entry_get_string (ArvGcEnumEntry *entry, GError **error)
-{
-	const char * string;
-	GError *local_error = NULL;
-
-	g_return_val_if_fail (ARV_IS_GC_ENUM_ENTRY (entry), 0);
-	g_return_val_if_fail (error == NULL || *error == NULL, 0);
-
-	if (entry->value == NULL)
-		return 0;
-
-	string = arv_gc_feature_node_get_name (ARV_GC_FEATURE_NODE (entry));
-
-	if (local_error != NULL) {
-		g_propagate_error (error, local_error);
-		return 0;
-	}
-
-	return string;
-}
-
 ArvGcNode *
 arv_gc_enum_entry_new (void)
 {
diff --git a/src/arvgcenumentry.h b/src/arvgcenumentry.h
index d05682e..25529ac 100644
--- a/src/arvgcenumentry.h
+++ b/src/arvgcenumentry.h
@@ -52,7 +52,6 @@ GType 		arv_gc_enum_entry_get_type 	(void);
 ArvGcNode * 	arv_gc_enum_entry_new 		(void);
 
 gint64		arv_gc_enum_entry_get_value	(ArvGcEnumEntry *entry, GError **error);
-const char *	arv_gc_enum_entry_get_string	(ArvGcEnumEntry *entry, GError **error);
 
 G_END_DECLS
 
diff --git a/src/arvgcenumeration.c b/src/arvgcenumeration.c
index 971dc69..0ea0a2f 100644
--- a/src/arvgcenumeration.c
+++ b/src/arvgcenumeration.c
@@ -344,20 +344,8 @@ arv_gc_enumeration_get_available_string_values (ArvGcEnumeration *enumeration, g
 	}
 
 	strings = g_new (const char*, *n_values);
-	for (iter = available_entries, i = 0; iter != NULL; iter = iter->next) {
-
-		strings[i] = arv_gc_enum_entry_get_string (iter->data, &local_error);
-
-		if (local_error != NULL) {
-			g_propagate_error (error, local_error);
-			*n_values = 0;
-			g_slist_free (available_entries);
-			g_free (strings);
-
-			return NULL;
-		}
-		i++;
-	}
+	for (iter = available_entries, i = 0; iter != NULL; iter = iter->next, i++)
+		strings[i] = arv_gc_feature_node_get_name (iter->data);
 
 	g_slist_free (available_entries);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]