summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f986743)
raw | patch | inline | side by side (parent: f986743)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 14 Jul 2008 15:52:01 +0000 (15:52 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 14 Jul 2008 15:52:01 +0000 (15:52 +0000) |
(in this case actually it is not necessary, because there can be no derivatives of Geom::LineSegment, since they are added explicitly in the same code. However, I think it is good to set good example.)
src/libnr/n-art-bpath-2geom.cpp | patch | blob | history |
index bb88c4f1c857cf0e57a023f6d2ae4da735739121..2bd76e6234ba8bd5cfc920cfd80bcbdd3c19236b 100644 (file)
{ // about to start a new path, correct the current path: nartbpath manually adds the closing line segment so erase it for closed path.
if (current->closed() && !current->empty()) {
// but only remove this last segment if it is a *linesegment*:
- if ( typeid(current->back()) == typeid(Geom::LineSegment) ) {
+ if ( dynamic_cast<Geom::LineSegment const *>(¤t->back()) ) {
current->erase_last();
}
}
if ( current && current->closed() && !current->empty() ) {
// correct the current path: nartbpath manually adds the closing line segment so erase it for closed path.
// but only remove this last segment if it is a *linesegment*:
- if ( typeid(current->back()) == typeid(Geom::LineSegment) ) {
+ if ( dynamic_cast<Geom::LineSegment const *>(¤t->back()) ) {
current->erase_last();
}
}