[gnumeric] Compilation: more GOFormat constification.



commit c7ddea28ca681356f6f9d1fbed68b3f846818769
Author: Morten Welinder <terra gnome org>
Date:   Wed Nov 17 12:01:06 2010 -0500

    Compilation: more GOFormat constification.

 src/auto-format.c |    4 ++--
 src/value.c       |    2 +-
 src/value.h       |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/auto-format.c b/src/auto-format.c
index af1f235..4408c0b 100644
--- a/src/auto-format.c
+++ b/src/auto-format.c
@@ -71,7 +71,7 @@ cb_af_suggest (GnmCellIter const *iter, gpointer user)
 {
 	struct cb_af_suggest *data = user;
 
-	*(data->explicit) = (GOFormat *)gnm_cell_get_format (iter->cell);
+	*(data->explicit) = gnm_cell_get_format (iter->cell);
 	if (*(data->explicit)) {
 		data->typ = AF_EXPLICIT;
 		return VALUE_TERMINATE;
@@ -207,7 +207,7 @@ do_af_suggest (GnmExpr const *expr, GnmEvalPos const *epos, GOFormat const **exp
 		if (cell == NULL)
 			return GNM_FUNC_AUTO_UNKNOWN;
 
-		*explicit = (GOFormat *)gnm_cell_get_format (cell);
+		*explicit = gnm_cell_get_format (cell);
 		return *explicit ? AF_EXPLICIT : GNM_FUNC_AUTO_UNKNOWN;
 	}
 
diff --git a/src/value.c b/src/value.c
index 94dbd7e..c9611b6 100644
--- a/src/value.c
+++ b/src/value.c
@@ -1325,7 +1325,7 @@ value_set_fmt (GnmValue *v, GOFormat const *fmt)
 		go_format_ref (fmt);
 	if (VALUE_FMT (v) != NULL)
 		go_format_unref (VALUE_FMT (v));
-	v->v_any.fmt = (GOFormat *)fmt;
+	v->v_any.fmt = fmt;
 }
 
 /****************************************************************************/
diff --git a/src/value.h b/src/value.h
index 1f9a049..9ed22da 100644
--- a/src/value.h
+++ b/src/value.h
@@ -34,7 +34,7 @@ typedef enum {
 
 typedef struct {
 	GnmValueType const type;
-	GOFormat *fmt;
+	GOFormat const *fmt;
 } GnmValueAny;
 struct _GnmValueBool {
 	GnmValueType const type;
@@ -79,7 +79,7 @@ union _GnmValue {
 	GnmValueArray	v_array;
 };
 
-#define	VALUE_FMT(v)			((GOFormat const *)(v)->v_any.fmt)
+#define	VALUE_FMT(v)			((v)->v_any.fmt)
 #define VALUE_IS_EMPTY(v)		(((v) == NULL) || ((v)->type == VALUE_EMPTY))
 #define VALUE_IS_EMPTY_OR_ERROR(v)	(VALUE_IS_EMPTY(v) || (v)->type == VALUE_ERROR)
 #define VALUE_IS_STRING(v)		((v)->type == VALUE_STRING)



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