From 0651eb9e41d0e6680126456d6b7b665154ab7660 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Tue, 5 Aug 2008 14:33:46 +0000 Subject: Use is_straight_curve() instead of three separate dynamic casts (bzr r6564) --- src/livarot/PathCutting.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/livarot/PathCutting.cpp') diff --git a/src/livarot/PathCutting.cpp b/src/livarot/PathCutting.cpp index 3a7bd71ad..47956031f 100644 --- a/src/livarot/PathCutting.cpp +++ b/src/livarot/PathCutting.cpp @@ -28,6 +28,7 @@ #include <2geom/sbasis-to-bezier.h> #include <2geom/curves.h> #include "../display/canvas-bpath.h" +#include "helper/geom-curves.h" void Path::DashPolyline(float head,float tail,float body,int nbD,float *dashs,bool stPlain,float stOffset) { @@ -379,9 +380,7 @@ Path::MakePathVector() void Path::AddCurve(Geom::Curve const &c) { - if( dynamic_cast(&c) || - dynamic_cast(&c) || - dynamic_cast(&c) ) + if( is_straight_curve(c) ) { LineTo( from_2geom(c.finalPoint()) ); } -- cgit v1.2.3