[goffice] Compilation: avoid C++ comments.



commit e90f726a1d2fc07b9d43b8e5aefe28e9552ea659
Author: Morten Welinder <terra gnome org>
Date:   Thu Mar 7 11:14:05 2013 -0500

    Compilation: avoid C++ comments.

 ChangeLog                      |   12 ++++++++++++
 goffice/canvas/goc-arc.c       |   15 ++++++++++-----
 goffice/canvas/goc-ellipse.c   |    2 +-
 goffice/canvas/goc-group.c     |    2 +-
 goffice/canvas/goc-path.c      |    2 +-
 goffice/canvas/goc-rectangle.c |    2 +-
 goffice/utils/go-emf.c         |    2 +-
 7 files changed, 27 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 630359a..ce39625 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-03-07  Morten Welinder  <terra gnome org>
+
+       * goffice/canvas/goc-ellipse.c (goc_ellipse_distance): Avoid C++
+       comment.
+       * goffice/canvas/goc-group.c (goc_group_distance): Ditto.
+       * goffice/canvas/goc-path.c (goc_path_distance): Ditto.
+       * goffice/canvas/goc-rectangle.c (goc_rectangle_distance): Ditto.
+       * goffice/utils/go-emf.c (go_emf_load_data): Ditto.
+
+       * goffice/canvas/goc-arc.c (goc_arc_prepare_draw): Avoid C++
+       comment and rewrite arc type handling.
+
 2013-03-07  Jean Brefort  <jean brefort normalesup org>
 
        * goffice/utils/go-emf.c (go_emf_polypolygon),
diff --git a/goffice/canvas/goc-arc.c b/goffice/canvas/goc-arc.c
index a40fae3..43deef3 100644
--- a/goffice/canvas/goc-arc.c
+++ b/goffice/canvas/goc-arc.c
@@ -286,10 +286,15 @@ goc_arc_prepare_draw (GocItem const *item, cairo_t *cr, gboolean flag)
        ecc = arc->xr / arc->yr;
        cairo_scale (cr, arc->xr * sign, arc->yr);
        cairo_arc_negative (cr, 0., 0., 1., -atan2 (ecc * sin (arc->ang1), cos (arc->ang1)), -atan2 (ecc * 
sin (arc->ang2), cos (arc->ang2)));
-       if (ARC_TYPE_PIE == arc->type)
-               cairo_line_to (cr, 0., 0.); // together with next one gives Pie
-       if (arc->type > 0)
-               cairo_close_path (cr);          // gives "Chord"
+       switch (arc->type) {
+       case ARC_TYPE_PIE:
+               cairo_line_to (cr, 0., 0.);
+               /* Fall through */
+       case ARC_TYPE_CHORD:
+               cairo_close_path (cr);
+       default:
+               break;
+       }
        cairo_restore (cr);
 
        return TRUE;
@@ -353,7 +358,7 @@ goc_arc_distance (GocItem *item, double x, double y, GocItem **near_item)
        }
 
        if (goc_arc_prepare_draw (item, cr, 0)) {
-               // Filled OR both fill and stroke are none
+               /* Filled OR both fill and stroke are none */
                if ((arc->type > 0 && style->fill.type != GO_STYLE_FILL_NONE) ||
                        (style->fill.type == GO_STYLE_FILL_NONE && !goc_styled_item_set_cairo_line 
(GOC_STYLED_ITEM (item), cr))) {
                        if (cairo_in_fill (cr, x, y))
diff --git a/goffice/canvas/goc-ellipse.c b/goffice/canvas/goc-ellipse.c
index 9aed8a3..5bc5bdd 100644
--- a/goffice/canvas/goc-ellipse.c
+++ b/goffice/canvas/goc-ellipse.c
@@ -176,7 +176,7 @@ goc_ellipse_distance (GocItem *item, double x, double y, GocItem **near_item)
        cr = cairo_create (surface);
 
        if (goc_ellipse_prepare_draw (item, cr, 0)) {
-               // Filled OR both fill and stroke are none
+               /* Filled OR both fill and stroke are none */
                if (style->fill.type != GO_STYLE_FILL_NONE ||
                        (style->fill.type == GO_STYLE_FILL_NONE && !goc_styled_item_set_cairo_line 
(GOC_STYLED_ITEM (item), cr))) {
                        if (cairo_in_fill (cr, x, y))
diff --git a/goffice/canvas/goc-group.c b/goffice/canvas/goc-group.c
index 763c134..5452014 100644
--- a/goffice/canvas/goc-group.c
+++ b/goffice/canvas/goc-group.c
@@ -184,7 +184,7 @@ goc_group_distance (GocItem *item, double x, double y, GocItem **near_item)
                if (result == 0.)
                        break;
        }
-       // check if the click is not outside the clipping region
+       /* check if the click is not outside the clipping region */
        if (group->clip_path) {
        }
        return result;
diff --git a/goffice/canvas/goc-path.c b/goffice/canvas/goc-path.c
index f91f90e..2003a4b 100644
--- a/goffice/canvas/goc-path.c
+++ b/goffice/canvas/goc-path.c
@@ -180,7 +180,7 @@ goc_path_distance (GocItem *item, double x, double y, GocItem **near_item)
        cr = cairo_create (surface);
 
        if (goc_path_prepare_draw (item, cr, 0)) {
-               // Filled OR both fill and stroke are none
+               /* Filled OR both fill and stroke are none */
                if ((path->closed && style->fill.type != GO_STYLE_FILL_NONE) ||
                        (style->fill.type == GO_STYLE_FILL_NONE && !goc_styled_item_set_cairo_line 
(GOC_STYLED_ITEM (item), cr))) {
                        if (cairo_in_fill (cr, x, y))
diff --git a/goffice/canvas/goc-rectangle.c b/goffice/canvas/goc-rectangle.c
index c0e383d..6e0e0a6 100644
--- a/goffice/canvas/goc-rectangle.c
+++ b/goffice/canvas/goc-rectangle.c
@@ -251,7 +251,7 @@ goc_rectangle_distance (GocItem *item, double x, double y, GocItem **near_item)
        cr = cairo_create (surface);
 
        if (goc_rectangle_prepare_draw (item, cr, 0)) {
-               // Filled OR both fill and stroke are none
+               /* Filled OR both fill and stroke are none */
                if (style->fill.type != GO_STYLE_FILL_NONE ||
                        (style->fill.type == GO_STYLE_FILL_NONE && !goc_styled_item_set_cairo_line 
(GOC_STYLED_ITEM (item), cr))) {
                        if (cairo_in_fill (cr, x, y))
diff --git a/goffice/utils/go-emf.c b/goffice/utils/go-emf.c
index 53801c0..1d90772 100644
--- a/goffice/utils/go-emf.c
+++ b/goffice/utils/go-emf.c
@@ -91,7 +91,7 @@ go_emf_load_data (GOImage *image, GsfXMLIn *xin)
        go_emf_parse (emf, input, &error);
        g_object_unref (input);
        if (error) {
-               // FIXME: emit at least a warning
+               /* FIXME: emit at least a warning */
                g_error_free (error);
        }
 #else


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