summaryrefslogtreecommitdiffstats
path: root/src/sp-path.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-08-05 14:33:46 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-08-05 14:33:46 +0000
commit0651eb9e41d0e6680126456d6b7b665154ab7660 (patch)
tree794a0b30225009643ef882d51010bce5c8ae9cf8 /src/sp-path.cpp
parentmore mockup on svgfonts dialog (diff)
downloadinkscape-0651eb9e41d0e6680126456d6b7b665154ab7660.tar.gz
inkscape-0651eb9e41d0e6680126456d6b7b665154ab7660.zip
Use is_straight_curve() instead of three separate dynamic casts
(bzr r6564)
Diffstat (limited to 'src/sp-path.cpp')
-rw-r--r--src/sp-path.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index e641632d9..e0e10b6de 100644
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
@@ -25,6 +25,7 @@
#include <2geom/pathvector.h>
#include <2geom/bezier-curve.h>
#include <2geom/hvlinesegment.h>
+#include "helper/geom-curves.h"
#include "svg/svg.h"
#include "xml/repr.h"
@@ -157,9 +158,7 @@ sp_path_convert_to_guides(SPItem *item)
for(Geom::PathVector::const_iterator pit = pv.begin(); pit != pv.end(); ++pit) {
for(Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_default(); ++cit) {
// only add curves for straight line segments
- if( dynamic_cast<Geom::LineSegment const *>(&*cit) ||
- dynamic_cast<Geom::HLineSegment const *>(&*cit) ||
- dynamic_cast<Geom::VLineSegment const *>(&*cit) )
+ if( is_straight_curve(*cit) )
{
pts.push_back(std::make_pair(cit->initialPoint() * i2d, cit->finalPoint() * i2d));
}