From: johanengelen Date: Sat, 2 Aug 2008 22:52:40 +0000 (+0000) Subject: simplify pathv_to_linear_and_cubic_beziers a bit X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cf6dc070b078f9ac6b34fc31bdbc2b60c6ba6327;p=inkscape.git simplify pathv_to_linear_and_cubic_beziers a bit --- diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp index dcb7b3eb4..ac8930412 100644 --- a/src/helper/geom.cpp +++ b/src/helper/geom.cpp @@ -509,23 +509,17 @@ pathv_to_linear_and_cubic_beziers( Geom::PathVector const &pathv ) output.back().close( pit->closed() ); for (Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_open(); ++cit) { - if( dynamic_cast(&*cit) || + if( dynamic_cast(&*cit) || + dynamic_cast(&*cit) || dynamic_cast(&*cit) || dynamic_cast(&*cit) ) { output.back().append(*cit); } - else if(Geom::CubicBezier const *cubic_bezier = dynamic_cast(&*cit)) { - (void)cubic_bezier; - output.back().append(*cit); - } else { // convert all other curve types to cubicbeziers Geom::Path cubicbezier_path = Geom::cubicbezierpath_from_sbasis(cit->toSBasis(), 0.1); - - for(Geom::Path::iterator iter = cubicbezier_path.begin(); iter != cubicbezier_path.end(); ++iter) { - output.back().append(*iter); - } + output.back().append(cubicbezier_path); } } }