From: pjrm Date: Sat, 29 Sep 2007 07:22:11 +0000 (+0000) Subject: noop: CodingStyle: const placement X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e750fb8e7d6b8896903a14f2f45c54177f02bd2e;p=inkscape.git noop: CodingStyle: const placement --- diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp index 17fa97281..d7e60596f 100644 --- a/src/display/canvas-axonomgrid.cpp +++ b/src/display/canvas-axonomgrid.cpp @@ -160,7 +160,7 @@ namespace Inkscape { #define SPACE_SIZE_X 15 #define SPACE_SIZE_Y 10 static inline void -attach_all (Gtk::Table &table, const Gtk::Widget *arr[], unsigned size, int start = 0) +attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int start = 0) { for (unsigned i=0, r=start; iattribute("originx")) ) { sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &origin[NR::X], &gridunit); origin[NR::X] = sp_units_get_pixels(origin[NR::X], *(gridunit)); @@ -406,7 +405,7 @@ CanvasAxonomGrid::readRepr() * Called when XML node attribute changed; updates dialog widgets if change was not done by widgets themselves. */ void -CanvasAxonomGrid::onReprAttrChanged (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive) +CanvasAxonomGrid::onReprAttrChanged(Inkscape::XML::Node *repr, gchar const *key, gchar const *oldval, gchar const *newval, bool is_interactive) { readRepr(); @@ -518,16 +517,16 @@ CanvasAxonomGrid::Render (SPCanvasBuf *buf) // render the three separate line groups representing the main-axes: // x-axis always goes from topleft to bottomright. (0,0) - (1,1) - const gdouble xintercept_y_bc = (buf_tl_gc[NR::X] * tan_angle[X]) - buf_tl_gc[NR::Y] ; - const gdouble xstart_y_sc = ( xintercept_y_bc - floor(xintercept_y_bc/lyw)*lyw ) + buf->rect.y0; - const gint xlinestart = (gint) Inkscape::round( (xstart_y_sc - ow[NR::Y]) / lyw ); + gdouble const xintercept_y_bc = (buf_tl_gc[NR::X] * tan_angle[X]) - buf_tl_gc[NR::Y] ; + gdouble const xstart_y_sc = ( xintercept_y_bc - floor(xintercept_y_bc/lyw)*lyw ) + buf->rect.y0; + gint const xlinestart = (gint) Inkscape::round( (xstart_y_sc - ow[NR::Y]) / lyw ); gint xlinenum; // lijnen vanaf linker zijkant. for (y = xstart_y_sc, xlinenum = xlinestart; y < buf->rect.y1; y += lyw, xlinenum++) { - const gint x0 = buf->rect.x0; - const gint y0 = (gint) Inkscape::round(y); - const gint x1 = x0 + (gint) Inkscape::round( (buf->rect.y1 - y) / tan_angle[X] ); - const gint y1 = buf->rect.y1; + gint const x0 = buf->rect.x0; + gint const y0 = (gint) Inkscape::round(y); + gint const x1 = x0 + (gint) Inkscape::round( (buf->rect.y1 - y) / tan_angle[X] ); + gint const y1 = buf->rect.y1; if (!scaled && (xlinenum % empspacing) == 0) { sp_caxonomgrid_drawline (buf, x0, y0, x1, y1, empcolor); @@ -536,12 +535,12 @@ CanvasAxonomGrid::Render (SPCanvasBuf *buf) } } // lijnen vanaf bovenkant. - const gdouble xstart_x_sc = buf->rect.x0 + (lxw_x - (xstart_y_sc - buf->rect.y0) / tan_angle[X]) ; + gdouble const xstart_x_sc = buf->rect.x0 + (lxw_x - (xstart_y_sc - buf->rect.y0) / tan_angle[X]) ; for (x = xstart_x_sc, xlinenum = xlinestart; x < buf->rect.x1; x += lxw_x, xlinenum--) { - const gint y0 = buf->rect.y0; - const gint y1 = buf->rect.y1; - const gint x0 = (gint) Inkscape::round(x); - const gint x1 = x0 + (gint) Inkscape::round( (y1 - y0) / tan_angle[X] ); + gint const y0 = buf->rect.y0; + gint const y1 = buf->rect.y1; + gint const x0 = (gint) Inkscape::round(x); + gint const x1 = x0 + (gint) Inkscape::round( (y1 - y0) / tan_angle[X] ); if (!scaled && (xlinenum % empspacing) == 0) { sp_caxonomgrid_drawline (buf, x0, y0, x1, y1, empcolor); @@ -552,11 +551,11 @@ CanvasAxonomGrid::Render (SPCanvasBuf *buf) // y-axis lines (vertical) - const gdouble ystart_x_sc = floor (buf_tl_gc[NR::X] / spacing_ylines) * spacing_ylines + ow[NR::X]; - const gint ylinestart = (gint) Inkscape::round((ystart_x_sc - ow[NR::X]) / spacing_ylines); + gdouble const ystart_x_sc = floor (buf_tl_gc[NR::X] / spacing_ylines) * spacing_ylines + ow[NR::X]; + gint const ylinestart = (gint) Inkscape::round((ystart_x_sc - ow[NR::X]) / spacing_ylines); gint ylinenum; for (x = ystart_x_sc, ylinenum = ylinestart; x < buf->rect.x1; x += spacing_ylines, ylinenum++) { - const gint x0 = (gint) Inkscape::round(x); + gint const x0 = (gint) Inkscape::round(x); if (!scaled && (ylinenum % empspacing) == 0) { sp_grid_vline (buf, x0, buf->rect.y0, buf->rect.y1 - 1, empcolor); @@ -566,16 +565,16 @@ CanvasAxonomGrid::Render (SPCanvasBuf *buf) } // z-axis always goes from bottomleft to topright. (0,1) - (1,0) - const gdouble zintercept_y_bc = (buf_tl_gc[NR::X] * -tan_angle[Z]) - buf_tl_gc[NR::Y] ; - const gdouble zstart_y_sc = ( zintercept_y_bc - floor(zintercept_y_bc/lyw)*lyw ) + buf->rect.y0; - const gint zlinestart = (gint) Inkscape::round( (zstart_y_sc - ow[NR::Y]) / lyw ); + gdouble const zintercept_y_bc = (buf_tl_gc[NR::X] * -tan_angle[Z]) - buf_tl_gc[NR::Y] ; + gdouble const zstart_y_sc = ( zintercept_y_bc - floor(zintercept_y_bc/lyw)*lyw ) + buf->rect.y0; + gint const zlinestart = (gint) Inkscape::round( (zstart_y_sc - ow[NR::Y]) / lyw ); gint zlinenum; // lijnen vanaf linker zijkant. for (y = zstart_y_sc, zlinenum = zlinestart; y < buf->rect.y1; y += lyw, zlinenum++) { - const gint x0 = buf->rect.x0; - const gint y0 = (gint) Inkscape::round(y); - const gint x1 = x0 + (gint) Inkscape::round( (y - buf->rect.y0 ) / tan_angle[Z] ); - const gint y1 = buf->rect.y0; + gint const x0 = buf->rect.x0; + gint const y0 = (gint) Inkscape::round(y); + gint const x1 = x0 + (gint) Inkscape::round( (y - buf->rect.y0 ) / tan_angle[Z] ); + gint const y1 = buf->rect.y0; if (!scaled && (zlinenum % empspacing) == 0) { sp_caxonomgrid_drawline (buf, x0, y0, x1, y1, empcolor); @@ -584,12 +583,12 @@ CanvasAxonomGrid::Render (SPCanvasBuf *buf) } } // draw lines from bottom-up - const gdouble zstart_x_sc = buf->rect.x0 + (y - buf->rect.y1) / tan_angle[Z] ; + gdouble const zstart_x_sc = buf->rect.x0 + (y - buf->rect.y1) / tan_angle[Z] ; for (x = zstart_x_sc; x < buf->rect.x1; x += lxw_z, zlinenum--) { - const gint y0 = buf->rect.y1; - const gint y1 = buf->rect.y0; - const gint x0 = (gint) Inkscape::round(x); - const gint x1 = x0 + (gint) Inkscape::round( (buf->rect.y1 - buf->rect.y0) / tan_angle[Z] ); + gint const y0 = buf->rect.y1; + gint const y1 = buf->rect.y0; + gint const x0 = (gint) Inkscape::round(x); + gint const x1 = x0 + (gint) Inkscape::round( (buf->rect.y1 - buf->rect.y0) / tan_angle[Z] ); if (!scaled && (zlinenum % empspacing) == 0) { sp_caxonomgrid_drawline (buf, x0, y0, x1, y1, empcolor); diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 6c97e2605..7c391803e 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -31,11 +31,11 @@ namespace Inkscape { #define DEFAULTGRIDCOLOR 0x0000FF20 #define DEFAULTGRIDEMPCOLOR 0x0000FF40 -const gchar *grid_name [] = { +static gchar const *const grid_name[] = { N_("Rectangular grid"), N_("Axonometric grid") }; -const gchar *grid_svgname [] = { +static gchar const *const grid_svgname[] = { "xygrid", "axonomgrid" }; @@ -176,20 +176,20 @@ CanvasGrid::~CanvasGrid() -const char * +char const * CanvasGrid::getName(GridType type) { return _(grid_name[type]); } -const char * +char const * CanvasGrid::getSVGName(GridType type) { return grid_svgname[type]; } GridType -CanvasGrid::getGridTypeFromSVGName(const char * typestr) +CanvasGrid::getGridTypeFromSVGName(char const *typestr) { if (!typestr) return GRID_RECTANGULAR; @@ -201,7 +201,7 @@ CanvasGrid::getGridTypeFromSVGName(const char * typestr) } GridType -CanvasGrid::getGridTypeFromName(const char * typestr) +CanvasGrid::getGridTypeFromName(char const *typestr) { if (!typestr) return GRID_RECTANGULAR; @@ -285,7 +285,7 @@ CanvasGrid::createCanvasItem(SPDesktop * desktop) } void -CanvasGrid::on_repr_attr_changed (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive, void * data) +CanvasGrid::on_repr_attr_changed(Inkscape::XML::Node *repr, gchar const *key, gchar const *oldval, gchar const *newval, bool is_interactive, void *data) { if (!data) return; @@ -312,7 +312,7 @@ CanvasGrid::on_repr_attr_changed (Inkscape::XML::Node * repr, const gchar *key, #define SPACE_SIZE_X 15 #define SPACE_SIZE_Y 10 static inline void -attach_all (Gtk::Table &table, const Gtk::Widget *arr[], unsigned size, int start = 0) +attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int start = 0) { for (unsigned i=0, r=start; iattribute("originx")) ) { sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &origin[NR::X], &gridunit); origin[NR::X] = sp_units_get_pixels(origin[NR::X], *(gridunit)); @@ -605,7 +605,7 @@ CanvasXYGrid::readRepr() * Called when XML node attribute changed; updates dialog widgets if change was not done by widgets themselves. */ void -CanvasXYGrid::onReprAttrChanged (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive) +CanvasXYGrid::onReprAttrChanged(Inkscape::XML::Node *repr, gchar const *key, gchar const *oldval, gchar const *newval, bool is_interactive) { readRepr(); @@ -753,16 +753,16 @@ grid_dot (SPCanvasBuf *buf, gint x, gint y, guint32 rgba) void CanvasXYGrid::Render (SPCanvasBuf *buf) { - const gdouble sxg = floor ((buf->rect.x0 - ow[NR::X]) / sw[NR::X]) * sw[NR::X] + ow[NR::X]; - const gint xlinestart = (gint) Inkscape::round((sxg - ow[NR::X]) / sw[NR::X]); - const gdouble syg = floor ((buf->rect.y0 - ow[NR::Y]) / sw[NR::Y]) * sw[NR::Y] + ow[NR::Y]; - const gint ylinestart = (gint) Inkscape::round((syg - ow[NR::Y]) / sw[NR::Y]); + gdouble const sxg = floor ((buf->rect.x0 - ow[NR::X]) / sw[NR::X]) * sw[NR::X] + ow[NR::X]; + gint const xlinestart = (gint) Inkscape::round((sxg - ow[NR::X]) / sw[NR::X]); + gdouble const syg = floor ((buf->rect.y0 - ow[NR::Y]) / sw[NR::Y]) * sw[NR::Y] + ow[NR::Y]; + gint const ylinestart = (gint) Inkscape::round((syg - ow[NR::Y]) / sw[NR::Y]); if (!render_dotted) { gint ylinenum; gdouble y; for (y = syg, ylinenum = ylinestart; y < buf->rect.y1; y += sw[NR::Y], ylinenum++) { - const gint y0 = (gint) Inkscape::round(y); + gint const y0 = (gint) Inkscape::round(y); if (!scaled[NR::Y] && (ylinenum % empspacing) == 0) { grid_hline (buf, y0, buf->rect.x0, buf->rect.x1 - 1, empcolor); @@ -774,7 +774,7 @@ CanvasXYGrid::Render (SPCanvasBuf *buf) gint xlinenum; gdouble x; for (x = sxg, xlinenum = xlinestart; x < buf->rect.x1; x += sw[NR::X], xlinenum++) { - const gint ix = (gint) Inkscape::round(x); + gint const ix = (gint) Inkscape::round(x); if (!scaled[NR::X] && (xlinenum % empspacing) == 0) { grid_vline (buf, ix, buf->rect.y0, buf->rect.y1, empcolor); } else { @@ -785,12 +785,12 @@ CanvasXYGrid::Render (SPCanvasBuf *buf) gint ylinenum; gdouble y; for (y = syg, ylinenum = ylinestart; y < buf->rect.y1; y += sw[NR::Y], ylinenum++) { - const gint iy = (gint) Inkscape::round(y); + gint const iy = (gint) Inkscape::round(y); gint xlinenum; gdouble x; for (x = sxg, xlinenum = xlinestart; x < buf->rect.x1; x += sw[NR::X], xlinenum++) { - const gint ix = (gint) Inkscape::round(x); + gint const ix = (gint) Inkscape::round(x); if ( (!scaled[NR::X] && (xlinenum % empspacing) == 0) || (!scaled[NR::Y] && (ylinenum % empspacing) == 0) ) { diff --git a/src/display/nr-arena-image.cpp b/src/display/nr-arena-image.cpp index e388fca1d..6f3093782 100644 --- a/src/display/nr-arena-image.cpp +++ b/src/display/nr-arena-image.cpp @@ -201,14 +201,14 @@ nr_arena_image_render (cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock if (Falpha < 1) return item->state; unsigned char * dpx = NR_PIXBLOCK_PX (pb); - const int drs = pb->rs; - const int dw = pb->area.x1 - pb->area.x0; - const int dh = pb->area.y1 - pb->area.y0; + int const drs = pb->rs; + int const dw = pb->area.x1 - pb->area.x0; + int const dh = pb->area.y1 - pb->area.y0; unsigned char * spx = image->px; - const int srs = image->pxrs; - const int sw = image->pxw; - const int sh = image->pxh; + int const srs = image->pxrs; + int const sw = image->pxw; + int const sh = image->pxh; if (pb->mode == NR_PIXBLOCK_MODE_R8G8B8) { /* fixme: This is not implemented yet (Lauris) */ @@ -312,13 +312,13 @@ nr_arena_image_pick (NRArenaItem *item, NR::Point p, double delta, unsigned int } else { - unsigned char * const pixels = image->px; - const int width = image->pxw; - const int height = image->pxh; - const int rowstride = image->pxrs; + unsigned char *const pixels = image->px; + int const width = image->pxw; + int const height = image->pxh; + int const rowstride = image->pxrs; NR::Point tp = p * image->grid2px; - const int ix = (int)(tp[NR::X]); - const int iy = (int)(tp[NR::Y]); + int const ix = (int)(tp[NR::X]); + int const iy = (int)(tp[NR::Y]); if ((ix < 0) || (iy < 0) || (ix >= width) || (iy >= height)) return NULL; @@ -332,7 +332,7 @@ nr_arena_image_pick (NRArenaItem *item, NR::Point p, double delta, unsigned int /* Utility */ void -nr_arena_image_set_pixels (NRArenaImage *image, const unsigned char *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs) +nr_arena_image_set_pixels (NRArenaImage *image, unsigned char const *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs) { nr_return_if_fail (image != NULL); nr_return_if_fail (NR_IS_ARENA_IMAGE (image)); diff --git a/src/display/nr-arena-image.h b/src/display/nr-arena-image.h index d7a9c1c7c..f9861b2ff 100644 --- a/src/display/nr-arena-image.h +++ b/src/display/nr-arena-image.h @@ -50,7 +50,7 @@ struct NRArenaImageClass { NRArenaItemClass parent_class; }; -void nr_arena_image_set_pixels (NRArenaImage *image, const unsigned char *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs); +void nr_arena_image_set_pixels (NRArenaImage *image, unsigned char const *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs); void nr_arena_image_set_geometry (NRArenaImage *image, double x, double y, double width, double height); void nr_arena_image_set_style (NRArenaImage *image, SPStyle *style); diff --git a/src/display/nr-arena-shape.h b/src/display/nr-arena-shape.h index 9b4c846fe..c3ff59b39 100644 --- a/src/display/nr-arena-shape.h +++ b/src/display/nr-arena-shape.h @@ -212,7 +212,7 @@ struct NRArenaShapeClass { }; void nr_arena_shape_set_path(NRArenaShape *shape, SPCurve *curve, bool justTrans); -void nr_arena_shape_set_style (NRArenaShape *shape, SPStyle *style); -void nr_arena_shape_set_paintbox (NRArenaShape *shape, const NRRect *pbox); +void nr_arena_shape_set_style(NRArenaShape *shape, SPStyle *style); +void nr_arena_shape_set_paintbox(NRArenaShape *shape, NRRect const *pbox); #endif diff --git a/src/display/sodipodi-ctrl.cpp b/src/display/sodipodi-ctrl.cpp index 27f53633c..fd655edb0 100644 --- a/src/display/sodipodi-ctrl.cpp +++ b/src/display/sodipodi-ctrl.cpp @@ -44,7 +44,7 @@ sp_ctrl_get_type (void) { static GtkType ctrl_type = 0; if (!ctrl_type) { - static const GTypeInfo ctrl_info = { + static GTypeInfo const ctrl_info = { sizeof (SPCtrlClass), NULL, /* base_init */ NULL, /* base_finalize */ @@ -266,8 +266,8 @@ sp_ctrl_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_item) *actual_item = item; - const double x = p[NR::X]; - const double y = p[NR::Y]; + double const x = p[NR::X]; + double const y = p[NR::Y]; if ((x >= ctrl->box.x0) && (x <= ctrl->box.x1) && (y >= ctrl->box.y0) && (y <= ctrl->box.y1)) return 0.0; diff --git a/src/display/sp-canvas-util.cpp b/src/display/sp-canvas-util.cpp index 284328d7f..a0c74b2c3 100644 --- a/src/display/sp-canvas-util.cpp +++ b/src/display/sp-canvas-util.cpp @@ -123,8 +123,8 @@ void sp_canvas_item_move_to_z (SPCanvasItem * item, gint z) gint sp_canvas_item_compare_z (SPCanvasItem * a, SPCanvasItem * b) { - const gint o_a = sp_canvas_item_order (a); - const gint o_b = sp_canvas_item_order (b); + gint const o_a = sp_canvas_item_order (a); + gint const o_b = sp_canvas_item_order (b); if (o_a > o_b) return -1; if (o_a < o_b) return 1; diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 1714bd454..f6a27b076 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -55,7 +55,7 @@ enum { RENDERMODE_OUTLINE }; -const gint sp_canvas_update_priority = G_PRIORITY_HIGH_IDLE; +static gint const sp_canvas_update_priority = G_PRIORITY_HIGH_IDLE; #define SP_CANVAS_WINDOW(c) (((GtkWidget *) (c))->window) @@ -101,7 +101,7 @@ static void sp_canvas_request_update (SPCanvas *canvas); static void sp_canvas_item_class_init (SPCanvasItemClass *klass); static void sp_canvas_item_init (SPCanvasItem *item); static void sp_canvas_item_dispose (GObject *object); -static void sp_canvas_item_construct (SPCanvasItem *item, SPCanvasGroup *parent, const gchar *first_arg_name, va_list args); +static void sp_canvas_item_construct (SPCanvasItem *item, SPCanvasGroup *parent, gchar const *first_arg_name, va_list args); static int emit_event (SPCanvas *canvas, GdkEvent *event); @@ -117,7 +117,7 @@ sp_canvas_item_get_type (void) { static GType type = 0; if (!type) { - static const GTypeInfo info = { + static GTypeInfo const info = { sizeof (SPCanvasItemClass), NULL, NULL, (GClassInitFunc) sp_canvas_item_class_init, @@ -170,7 +170,7 @@ sp_canvas_item_init (SPCanvasItem *item) * Constructs new SPCanvasItem on SPCanvasGroup. */ SPCanvasItem * -sp_canvas_item_new (SPCanvasGroup *parent, GtkType type, const gchar *first_arg_name, ...) +sp_canvas_item_new (SPCanvasGroup *parent, GtkType type, gchar const *first_arg_name, ...) { va_list args; @@ -193,7 +193,7 @@ sp_canvas_item_new (SPCanvasGroup *parent, GtkType type, const gchar *first_arg_ * We make it static for encapsulation reasons since it was nowhere used. */ static void -sp_canvas_item_construct (SPCanvasItem *item, SPCanvasGroup *parent, const gchar *first_arg_name, va_list args) +sp_canvas_item_construct (SPCanvasItem *item, SPCanvasGroup *parent, gchar const *first_arg_name, va_list args) { g_return_if_fail (SP_IS_CANVAS_GROUP (parent)); g_return_if_fail (SP_IS_CANVAS_ITEM (item)); @@ -323,7 +323,7 @@ sp_canvas_item_invoke_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **act * @affine: An affine transformation matrix. */ void -sp_canvas_item_affine_absolute (SPCanvasItem *item, NR::Matrix const& affine) +sp_canvas_item_affine_absolute (SPCanvasItem *item, NR::Matrix const &affine) { item->xform = affine; @@ -688,7 +688,7 @@ sp_canvas_group_get_type (void) static GtkType group_type = 0; if (!group_type) { - static const GtkTypeInfo group_info = { + static GtkTypeInfo const group_info = { "SPCanvasGroup", sizeof (SPCanvasGroup), sizeof (SPCanvasGroupClass), @@ -740,7 +740,7 @@ sp_canvas_group_destroy (GtkObject *object) g_return_if_fail (object != NULL); g_return_if_fail (SP_IS_CANVAS_GROUP (object)); - const SPCanvasGroup *group = SP_CANVAS_GROUP (object); + SPCanvasGroup const *group = SP_CANVAS_GROUP (object); GList *list = group->items; while (list) { @@ -760,7 +760,7 @@ sp_canvas_group_destroy (GtkObject *object) static void sp_canvas_group_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int flags) { - const SPCanvasGroup *group = SP_CANVAS_GROUP (item); + SPCanvasGroup const *group = SP_CANVAS_GROUP (item); NR::ConvexHull corners(NR::Point(0, 0)); bool empty=true; @@ -798,9 +798,9 @@ sp_canvas_group_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned i static double sp_canvas_group_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_item) { - const SPCanvasGroup *group = SP_CANVAS_GROUP (item); - const double x = p[NR::X]; - const double y = p[NR::Y]; + SPCanvasGroup const *group = SP_CANVAS_GROUP (item); + double const x = p[NR::X]; + double const y = p[NR::Y]; int x1 = (int)(x - item->canvas->close_enough); int y1 = (int)(y - item->canvas->close_enough); int x2 = (int)(x + item->canvas->close_enough); @@ -840,7 +840,7 @@ sp_canvas_group_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_it static void sp_canvas_group_render (SPCanvasItem *item, SPCanvasBuf *buf) { - const SPCanvasGroup *group = SP_CANVAS_GROUP (item); + SPCanvasGroup const *group = SP_CANVAS_GROUP (item); for (GList *list = group->items; list; list = list->next) { SPCanvasItem *child = (SPCanvasItem *)list->data; @@ -944,7 +944,7 @@ sp_canvas_get_type (void) static GtkType canvas_type = 0; if (!canvas_type) { - static const GtkTypeInfo canvas_info = { + static GtkTypeInfo const canvas_info = { "SPCanvas", sizeof (SPCanvas), sizeof (SPCanvasClass), @@ -2046,7 +2046,7 @@ idle_handler (gpointer data) SPCanvas *canvas = SP_CANVAS (data); - const int ret = do_update (canvas); + int const ret = do_update (canvas); if (ret) { /* Reset idle id */