From 9a7fa4d1899d30ec745107823f307b2a0bf3172f Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 27 Feb 2015 03:10:36 +0100 Subject: corrected the casts (hopefully) (bzr r13922.1.10) --- src/splivarot.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/splivarot.cpp') diff --git a/src/splivarot.cpp b/src/splivarot.cpp index 6e47dfff3..bc09802f0 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -60,11 +60,6 @@ using Inkscape::DocumentUndo; bool Ancetre(Inkscape::XML::Node *a, Inkscape::XML::Node *who); -//SHOULD DISAPPEAR -bool sp_repr_compare_position_obj(SPObject* &a,SPObject* &b){ - return sp_repr_compare_position(dynamic_cast(a),dynamic_cast(b)); -} - void sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool_op bop, const unsigned int verb=SP_VERB_NONE, const Glib::ustring description=""); void sp_selected_path_do_offset(SPDesktop *desktop, bool expand, double prefOffset); void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool updating); @@ -405,7 +400,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool // otherwise bail out for (std::vector::const_iterator l = il.begin(); l != il.end(); l++) { - SPItem *item = SP_ITEM(*l); + SPItem *item = *l; if (!SP_IS_SHAPE(item) && !SP_IS_TEXT(item) && !SP_IS_FLOWTEXT(item)) { boolop_display_error_message(desktop, _("One of the objects is not a path, cannot perform boolean operation.")); @@ -428,7 +423,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool SP_LPE_ITEM(*l)->removeAllPathEffects(true); } - SPCSSAttr *css = sp_repr_css_attr(reinterpret_cast(il.front())->getRepr(), "style"); + SPCSSAttr *css = sp_repr_css_attr(reinterpret_cast(il[0])->getRepr(), "style"); gchar const *val = sp_repr_css_property(css, "fill-rule", NULL); if (val && strcmp(val, "nonzero") == 0) { origWind[curOrig]= fill_nonZero; @@ -438,7 +433,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool origWind[curOrig]= fill_nonZero; } - originaux[curOrig] = Path_for_item((SPItem *) (*l), true, true); + originaux[curOrig] = Path_for_item(*l, true, true); if (originaux[curOrig] == NULL || originaux[curOrig]->descr_cmd.size() <= 1) { for (int i = curOrig; i >= 0; i--) delete originaux[i]; @@ -475,7 +470,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool curOrig = 1; for (std::vector::const_iterator l = il.begin(); l != il.end(); l++){ - if(*l==il.front())continue; + if(*l==il[0])continue; originaux[curOrig]->ConvertWithBackData(0.1); originaux[curOrig]->Fill(theShape, curOrig); @@ -685,7 +680,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool SPObject *source; if ( bop == bool_op_diff || bop == bool_op_cut || bop == bool_op_slice ) { if (reverseOrderForOp) { - source = SP_OBJECT(il.front()); + source = SP_OBJECT(il[0]); } else { source = SP_OBJECT(il.back()); } @@ -1159,7 +1154,7 @@ sp_selected_path_outline(SPDesktop *desktop) bool did = false; std::vector il(selection->itemList()); for (std::vector::const_iterator l = il.begin(); l != il.end(); l++){ - SPItem *item = SP_ITEM(*l); + SPItem *item = *l; if (!SP_IS_SHAPE(item) && !SP_IS_TEXT(item)) continue; @@ -1771,7 +1766,7 @@ sp_selected_path_do_offset(SPDesktop *desktop, bool expand, double prefOffset) bool did = false; std::vector il(selection->itemList()); for (std::vector::const_iterator l = il.begin(); l != il.end(); l++){ - SPItem *item = SP_ITEM(*l); + SPItem *item = *l; SPCurve *curve = NULL; if (!SP_IS_SHAPE(item) && !SP_IS_TEXT(item)) @@ -2143,7 +2138,7 @@ sp_selected_path_simplify_items(SPDesktop *desktop, desktop->setWaitingCursor(); for (std::vector::const_iterator l = items.begin(); l != items.end(); l++){ - SPItem *item = SP_ITEM(*l); + SPItem *item = *l; if (!(SP_IS_GROUP(item) || SP_IS_SHAPE(item) || SP_IS_TEXT(item))) continue; -- cgit v1.2.3