graphics/inkscape commit r330754

Boris Samorodov bsam at passap.ru
Sat Oct 19 06:13:36 UTC 2013


18.10.2013 22:17, Tomasz Sowa пишет:
> Hi
> 
> Thank you for the update for compiling with clang. I have got a question
> about one function:
> void sp_item_rm_unsatisfied_cns(SPItem &item)
> from src/sp-item-rm-unsatisfied-cns.cpp
> 
> before patching it is:
> void sp_item_rm_unsatisfied_cns(SPItem &item)
> {
>     if (item.constraints.empty()) {
>         return;
>     }
>     std::vector<Inkscape::SnapCandidatePoint> snappoints;
>     sp_item_snappoints(&item, snappoints, NULL);
>     for (unsigned i = item.constraints.size(); i--;) {
>         g_assert( i < item.constraints.size() );
>         SPGuideConstraint const &cn = item.constraints[i];
>         int const snappoint_ix = cn.snappoint_ix;
>         g_assert( snappoint_ix < int(snappoints.size()) );
>         if (!approx_equal( sp_guide_distance_from_pt(cn.g,
> snappoints[snappoint_ix].getPoint()), 0) ) {
>             remove_last(cn.g->attached_items, SPGuideAttachment(&item,
> cn.snappoint_ix));
>             g_assert( i < item.constraints.size() );
>             vector<SPGuideConstraint>::iterator const
> ei(&item.constraints[i]);
>             item.constraints.erase(ei);
>         }
>     }
> }
> 
> but after patching the last erase() is changed to:
> item.constraints.erase(item.constraints.begin() + 1);
> 
> and this is not the same, it propably should be:
> item.constraints.erase(item.constraints.begin() + i);

Yep, that seems to be a typo.

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve


More information about the freebsd-ports mailing list