diff options
Diffstat (limited to 'src/vanishing-point.cpp')
| -rw-r--r-- | src/vanishing-point.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp index a6be353f8..8158a76a9 100644 --- a/src/vanishing-point.cpp +++ b/src/vanishing-point.cpp @@ -258,8 +258,8 @@ VanishingPoint::set_pos(Proj::Pt2 const &pt) { std::list<SPBox3D *> VanishingPoint::selectedBoxes(Inkscape::Selection *sel) { std::list<SPBox3D *> sel_boxes; - std::vector<SPItem*> itemlist= sel->items(); - for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) { + auto itemlist= sel->items(); + for (auto i=itemlist.begin();i!=itemlist.end();++i) { SPItem *item = *i; SPBox3D *box = dynamic_cast<SPBox3D *>(item); if (box && this->hasBox(box)) { @@ -397,8 +397,8 @@ VPDragger::VPsOfSelectedBoxes() { VanishingPoint *vp; // FIXME: Should we take the selection from the parent VPDrag? I guess it shouldn't make a difference. Inkscape::Selection *sel = SP_ACTIVE_DESKTOP->getSelection(); - std::vector<SPItem*> itemlist= sel->items(); - for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) { + auto itemlist= sel->items(); + for (auto i=itemlist.begin();i!=itemlist.end();++i) { SPItem *item = *i; SPBox3D *box = dynamic_cast<SPBox3D *>(item); if (box) { @@ -575,8 +575,8 @@ VPDrag::updateDraggers () g_return_if_fail (this->selection != NULL); - std::vector<SPItem*> itemlist= this->selection->items(); - for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) { + auto itemlist= this->selection->items(); + for (auto i=itemlist.begin();i!=itemlist.end();++i) { SPItem *item = *i; SPBox3D *box = dynamic_cast<SPBox3D *>(item); if (box) { @@ -607,8 +607,8 @@ VPDrag::updateLines () g_return_if_fail (this->selection != NULL); - std::vector<SPItem*> itemlist= this->selection->items(); - for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) { + auto itemlist= this->selection->items(); + for (auto i=itemlist.begin();i!=itemlist.end();++i) { SPItem *item = *i; SPBox3D *box = dynamic_cast<SPBox3D *>(item); if (box) { @@ -625,11 +625,11 @@ VPDrag::updateBoxHandles () // FIXME: Is there a way to update the knots without accessing the // (previously) statically linked function KnotHolder::update_knots? - std::vector<SPItem*> sel = selection->items(); + auto sel = selection->items(); if (sel.empty()) return; // no selection - if (sel.size() > 1) { + if (boost::distance(sel) > 1) { // Currently we only show handles if a single box is selected return; } |
