[goffice] compilation: more float elimination.



commit 6dad8aef560915ce0f9ab8df482374a32ba4d4cd
Author: Morten Welinder <terra gnome org>
Date:   Wed Nov 18 17:05:23 2009 -0500

    compilation: more float elimination.

 goffice/graph/gog-error-bar.h |    4 ++--
 plugins/plot_pie/gog-pie.c    |   38 +++++++++++++++++++-------------------
 plugins/plot_pie/gog-pie.h    |   14 +++++++-------
 plugins/plot_xy/gog-xy.h      |    2 +-
 4 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/goffice/graph/gog-error-bar.h b/goffice/graph/gog-error-bar.h
index a7fe992..31631f0 100644
--- a/goffice/graph/gog-error-bar.h
+++ b/goffice/graph/gog-error-bar.h
@@ -47,14 +47,14 @@ typedef enum {
 	GOG_ERROR_BAR_DISPLAY_BOTH
 } GogErrorBarDisplay;
 
-struct  _GogErrorBar{
+struct  _GogErrorBar {
 	GObject	base;
 	GogErrorBarType type;
 	GogSeries *series;
 	int dim_i;
 	int error_i;
 	GogErrorBarDisplay display;
-	float width;
+	double width;
 	GOStyle* style;
 };
 
diff --git a/plugins/plot_pie/gog-pie.c b/plugins/plot_pie/gog-pie.c
index 4ef62f2..0eaa15d 100644
--- a/plugins/plot_pie/gog-pie.c
+++ b/plugins/plot_pie/gog-pie.c
@@ -52,7 +52,7 @@ gog_pie_series_element_set_property (GObject *obj, guint param_id,
 	GogPieSeriesElement *pse = GOG_PIE_SERIES_ELEMENT (obj);
 
 	switch (param_id) {
-	case ELEMENT_SEPARATION :
+	case ELEMENT_SEPARATION:
 		pse->separation = g_value_get_float (value);
 		break;
 
@@ -70,7 +70,7 @@ gog_pie_series_element_get_property (GObject *obj, guint param_id,
 	GogPieSeriesElement *pse = GOG_PIE_SERIES_ELEMENT (obj);
 
 	switch (param_id) {
-	case ELEMENT_SEPARATION :
+	case ELEMENT_SEPARATION:
 		g_value_set_float (value, pse->separation);
 		break;
 	default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
@@ -190,20 +190,20 @@ gog_pie_plot_set_property (GObject *obj, guint param_id,
 			   GValue const *value, GParamSpec *pspec)
 {
 	GogPiePlot *pie = GOG_PIE_PLOT (obj);
-	float f;
 
 	switch (param_id) {
-	case PLOT_PROP_INITIAL_ANGLE :
+	case PLOT_PROP_INITIAL_ANGLE:
 		pie->initial_angle = g_value_get_float (value);
 		break;
-	case PLOT_PROP_DEFAULT_SEPARATION :
-		f = g_value_get_float (value);
+	case PLOT_PROP_DEFAULT_SEPARATION: {
+		double f = g_value_get_float (value);
 		pie->default_separation = CLAMP (f, 0., 5.);
 		break;
-	case PLOT_PROP_IN_3D :
+	}
+	case PLOT_PROP_IN_3D:
 		pie->in_3d = g_value_get_boolean (value);
 		break;
-	case PLOT_PROP_SPAN :
+	case PLOT_PROP_SPAN:
 		pie->span = g_value_get_float (value);
 		break;
 	case PLOT_PROP_SHOW_NEGS : {
@@ -233,19 +233,19 @@ gog_pie_plot_get_property (GObject *obj, guint param_id,
 	GogPiePlot *pie = GOG_PIE_PLOT (obj);
 
 	switch (param_id) {
-	case PLOT_PROP_INITIAL_ANGLE :
+	case PLOT_PROP_INITIAL_ANGLE:
 		g_value_set_float (value, pie->initial_angle);
 		break;
-	case PLOT_PROP_DEFAULT_SEPARATION :
+	case PLOT_PROP_DEFAULT_SEPARATION:
 		g_value_set_float (value, pie->default_separation);
 		break;
-	case PLOT_PROP_IN_3D :
+	case PLOT_PROP_IN_3D:
 		g_value_set_boolean (value, pie->in_3d);
 		break;
-	case PLOT_PROP_SPAN :
+	case PLOT_PROP_SPAN:
 		g_value_set_float (value, pie->span);
 		break;
-	case PLOT_PROP_SHOW_NEGS :
+	case PLOT_PROP_SHOW_NEGS:
 		g_value_set_string (value, gog_show_neg_mode_as_str (pie->show_negatives));
 		break;
 	default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
@@ -384,7 +384,7 @@ gog_ring_plot_set_property (GObject *obj, guint param_id,
 	GogRingPlot *ring = GOG_RING_PLOT (obj);
 
 	switch (param_id) {
-	case RING_PLOT_PROP_CENTER_SIZE :
+	case RING_PLOT_PROP_CENTER_SIZE:
 		ring->center_size = g_value_get_float (value);
 		break;
 
@@ -404,7 +404,7 @@ gog_ring_plot_get_property (GObject *obj, guint param_id,
 	GogRingPlot *ring = GOG_RING_PLOT (obj);
 
 	switch (param_id) {
-	case RING_PLOT_PROP_CENTER_SIZE :
+	case RING_PLOT_PROP_CENTER_SIZE:
 		g_value_set_float (value, ring->center_size);
 		break;
 	default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
@@ -1039,10 +1039,10 @@ gog_pie_series_set_property (GObject *obj, guint param_id,
 	GogPieSeries *pie = GOG_PIE_SERIES (obj);
 
 	switch (param_id) {
-	case SERIES_PROP_INITIAL_ANGLE :
+	case SERIES_PROP_INITIAL_ANGLE:
 		pie->initial_angle = g_value_get_float (value);
 		break;
-	case SERIES_PROP_SEPARATION :
+	case SERIES_PROP_SEPARATION:
 		pie->separation = g_value_get_float (value);
 		break;
 	default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
@@ -1060,10 +1060,10 @@ gog_pie_series_get_property (GObject *obj, guint param_id,
 	GogPieSeries *pie = GOG_PIE_SERIES (obj);
 
 	switch (param_id) {
-	case SERIES_PROP_INITIAL_ANGLE :
+	case SERIES_PROP_INITIAL_ANGLE:
 		g_value_set_float (value, pie->initial_angle);
 		break;
-	case SERIES_PROP_SEPARATION :
+	case SERIES_PROP_SEPARATION:
 		g_value_set_float (value, pie->separation);
 		break;
 	default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
diff --git a/plugins/plot_pie/gog-pie.h b/plugins/plot_pie/gog-pie.h
index 1905802..f982c05 100644
--- a/plugins/plot_pie/gog-pie.h
+++ b/plugins/plot_pie/gog-pie.h
@@ -42,9 +42,9 @@ GType gog_pie_series_element_get_type (void);
 typedef struct {
 	GogPlot	base;
 
-	float	 initial_angle;	 	/* degrees counterclockwise from 3 o'clock */
-	float  span;
-	float	 default_separation;	/* as a percentage of the radius */
+	double	 initial_angle;	 	/* degrees counter-clockwise from 3 o'clock */
+	double   span;
+	double	 default_separation;	/* as a percentage of the radius */
 	gboolean in_3d;
 	unsigned show_negatives;
 } GogPiePlot;
@@ -58,7 +58,7 @@ GType gog_pie_plot_get_type (void);
 typedef struct {
 	GogPiePlot	base;
 
-	float	 center_size;
+	double	 center_size;
 } GogRingPlot;
 
 #define GOG_TYPE_RING_PLOT	(gog_ring_plot_get_type ())
@@ -70,11 +70,11 @@ GType gog_ring_plot_get_type (void);
 typedef struct {
 	GogSeries base;
 
-	float	 initial_angle;	/* degrees counterclockwise from 3 o'clock */
-	float	 separation;	/* as a percentage of the radius */
+	double	 initial_angle;	/* degrees counterclockwise from 3 o'clock */
+	double	 separation;	/* as a percentage of the radius */
 
 	double   total;
-	float	*extensions;
+	double	*extensions;
 } GogPieSeries;
 
 #define GOG_TYPE_PIE_SERIES	(gog_pie_series_get_type ())
diff --git a/plugins/plot_xy/gog-xy.h b/plugins/plot_xy/gog-xy.h
index abd1c18..65cf5c5 100644
--- a/plugins/plot_xy/gog-xy.h
+++ b/plugins/plot_xy/gog-xy.h
@@ -50,7 +50,7 @@ typedef struct {
 	gboolean size_as_area;
 	gboolean in_3d;
 	gboolean show_negatives;
-	float bubble_scale;
+	double bubble_scale;
 } GogBubblePlot;
 
 typedef struct {



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